Remove-each - Function SummarySummary:Removes a value from a series for each block that returns TRUE. Usage:remove-each word data body Arguments:word - Word or block of words to set each time (will be local) (must be: get-word word block) data - The series to traverse (must be: series) body - Block to evaluate. Return TRUE to remove. (must be: block) Description:REMOVE-EACH is similar to FOREACH, but removes values as it moves through a series. For each value in the series, a comparison block is executed. If the block returns true, then the value will be removed.
Using REMOVE-EACH for removing values provides much greater performance than using a WHILE or FORALL loop. This function is not available in older versions of REBOL. Related:foreach - Evaluates a block for each value(s) in a series.
| ||||
|