FOR-EACH Loop construct that repeats the loop until each of the elements in a collection is processed.
CONTROLS
FOR-EACH value block
value - this is the variable name that is used to access each individual value that needs to be processed within the loop.
block - Block with the instructions to process within the loop
This method has no refinements
FOR-EACH Loop construct that repeats the loop until each of the elements in a collection is processed.
Where does FOR-EACH come in handy?
Let [board-moves] binary! 7
change/repeat board-moves 6 7
for-each bee board-moves [
write/line bee
]
FOR
FOREVER
REPEAT
WHILE
UNTIL