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
seqa sequence


Outputs
eltan object


Word description
Outputs the last element of a sequence.

Errors
Throws an error if the sequence is empty.

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

Definition