lappend ( list1 list2 -- newlist )
Factor handbook » The language » Collections » Lists » Manipulating lists

Prev:lreverse ( list -- newlist )
Next:lcut ( list index -- before after )


Vocabulary
lists

Inputs
list1a list
list2a list


Outputs
newlista list


Word description
Appends the two lists to form a new list. The first list must be finite. The result is a strict cons cell, and the first list is exhausted.

Definition


: lappend ( list1 list2 -- newlist )
[ lreverse ] dip [ swons ] foldl ;