lreverse ( list -- newlist )
Factor handbook » The language » Collections » Lists » Manipulating lists

Prev:llength ( list -- n )
Next:lappend ( list1 list2 -- newlist )


Vocabulary
lists

Inputs
lista list


Outputs
newlista list


Word description
Reverses the input list, outputting a new, reversed list. The output is a strict cons list.

Definition

: lreverse ( list -- newlist ) nil [ swons ] foldl ;