Jump to content

Rebol Programming/remove-each

From Wikibooks, open books for an open world

USAGE:

[edit | edit source]
REMOVE-EACH 'word data body 

DESCRIPTION:

[edit | edit source]

Removes a value from a series for each block that returns TRUE.

REMOVE-EACH is a native value.

ARGUMENTS

[edit | edit source]
  • word -- Word or block of words to set each time (will be local) (Type: get-word word block)
  • data -- The series to traverse (Type: series)
  • body -- Block to evaluate. Return TRUE to remove. (Type: block)

SOURCE CODE

[edit | edit source]
remove-each: native[
    {Removes a value from a series for each block that returns TRUE.} 
    '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. Return TRUE to remove."
]