first2 ( seq -- first second )
Factor handbook » The language » Collections » Sequence operations » Accessing sequence elements

Prev:?last ( seq -- elt/f )
Next:first3 ( seq -- first second third )


Vocabulary
sequences

Inputs
seqa sequence


Outputs
firstthe first element
secondthe second element


Word description
Pushes the first two elements of a sequence.

Errors
Throws an error if the sequence has less than two elements.

See also
first, last, last2, but-last, but-last-slice, rest, rest-slice

Definition