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

Prev:unclip-slice ( seq -- rest-slice first )
Next:cut-slice ( seq n -- before-slice after-slice )


Inputs and outputs
seqa sequence
butlast-slicea slice
lastan object

Word description
Outputs a head sequence and the last element of seq; the head sequence consists of all elements of seq but the last. Unlike unclip-last, this word does not make a copy of the input sequence, and runs in constant time.

See also
unclip, unclip-slice, unclip-last