Combinators for lists
Factor handbook » The language » Collections » Lists

Prev:Manipulating lists


Several combinators exist for list traversal.
leach ( ... list quot: ( ... elt -- ... ) -- ... )

lmap ( ... list quot: ( ... elt -- ... newelt ) -- ... result )

foldl ( ... list identity quot: ( ... prev elt -- ... next ) -- ... result )

foldr ( ... list identity quot: ( ... prev elt -- ... next ) -- ... result )

lmap>array ( ... list quot: ( ... elt -- ... newelt ) -- ... array )