leach ( ... list quot: ( ... elt -- ... ) -- ... ) (original) (raw)

Vocabulary
lists

Inputs

list a list
quot a quotation with stack effect ( ... elt -- ... )

Outputs
None

Word description
Call the quotation for each item in the list.

See also
foldl, lmap-lazy, ltake, lfilter, lappend-lazy, lfrom, lfrom-by, lconcat, lcartesian-product, lcartesian-product*, lcartesian-map, lcartesian-map*, lmerge, lwhile, luntil

Definition

USING: kernel lists.private ;

IN: lists

: leach ( ... list quot: ( ... elt -- ... ) -- ... )
over nil? [ 2drop ] [ (leach) leach ] if ; inline recursive