Constructing strict lists
Factor handbook » The language » Collections » Lists

Prev:The list protocol
Next:Manipulating lists


Strict lists are simply cons cells where the car and cdr have already been evaluated. These are the lists of Lisp. To construct a strict list, the following words are provided:
cons ( car cdr -- cons-state )

swons ( cdr car -- cons )

sequence>list ( sequence -- list )

1list ( obj -- cons )

2list ( a b -- cons )

3list ( a b c -- cons )