Meta Project

The Unofficial Meta Documentation

FOR-EACH

Summary

FOR-EACH Loop construct that repeats the loop until each of the elements in a collection is processed.

Category

CONTROLS

Usage

FOR-EACH value block

Arguments

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

Refinements

This method has no refinements

Description

FOR-EACH Loop construct that repeats the loop until each of the elements in a collection is processed.

Example Code

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
]

Related

FOR  
FOREVER  
REPEAT  
WHILE  
UNTIL  

Back to the Meta Methods Reference index