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

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


Vocabulary
sequences

Inputs and outputs
seqa sequence
slicea slice


Word description
Outputs a virtual sequence sharing storage with all but the last element of the input sequence.

Errors
Throws an error on an empty sequence.

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

Definition