first ( seq -- first )
Factor handbook > The language > Collections > Sequence operations > Accessing sequence elements

Prev:?nth ( n seq -- elt/f )
Next:second ( seq -- second )


Vocabulary
sequences

Inputs and outputs
seqa sequence
firstthe first element of the sequence


Word description
Outputs the first element of the sequence.

Errors
Throws an error if the sequence is empty.

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

Definition