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

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


Vocabulary
sequences

Inputs and outputs
seqa sequence
eltan object


Word description
Outputs the last element of a sequence.

Errors
Throws an error if the sequence is empty.

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

Definition