unswons ( cons -- cdr car ) (original) (raw)

unswons ( cons -- cdr car )
Factor handbook » The language » Collections » Lists » Manipulating lists

Prev: uncons ( cons -- car cdr )
Next: lnth ( n list -- elt )

Vocabulary
lists

Inputs

cons a list

Outputs

cdr the tail of the list
car the head of the list

Word description
Put the head and tail of the list on the stack.

See also
cons, swons, uncons

Definition

USING: kernel ;

IN: lists

: unswons ( cons -- cdr car ) uncons swap ; inline