Rebol 程式設計/forall
外觀
FORALL 'word body
針對系列中的每個值評估塊。
FORALL 是一個函式值。
- 單詞 -- 設定為系列中每個位置的單詞,並作為結果而更改(型別:單詞)
- 主體 -- 每次評估的塊(型別:塊)
- 捕獲
- 丟擲
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]
]