REBOL Programming/foreach

< REBOL Programming

USAGE:

FOREACH 'word data body 

DESCRIPTION:

Evaluates a block for each value(s) in a series.

FOREACH is a native value.

ARGUMENTS

SOURCE CODE

foreach: native[
    "Evaluates a block for each value(s) in a series." 
    'word [get-word! word! block!] {Word or block of words to set each time (will be local)} 
    data [series!] "The series to traverse" 
    body [block!] "Block to evaluate each time"
]
This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.