REBOL Programming/forall

< REBOL Programming

USAGE:

FORALL 'word body 

DESCRIPTION:

Evaluates a block for every value in a series.

FORALL is a function value.

ARGUMENTS

(SPECIAL ATTRIBUTES)

SOURCE CODE

forall: func [
    "Evaluates a block for every value in a series." 
    [catch throw] 
    'word [word!] {Word set to each position in series and changed as a result} 
    body [block!] "Block to evaluate each time"
][
    throw-on-error [forskip :word 1 body]
]
This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.