but-last ( seq -- headseq )
Factor handbook > The language > Collections > Sequence operations > Subsequences and slices

Prev:rest ( seq -- tailseq )
Next:unclip ( seq -- rest first )


Vocabulary
sequences

Inputs and outputs
seqa sequence
headseqa new sequence


Word description
Outputs a new sequence consisting of the input sequence with the last item removed.

Errors
Throws an error on an empty sequence.

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

Definition

: but-last ( seq -- headseq ) 1 head* ;