pop* ( seq -- )
Factor documentation > Factor handbook > The language > Collections > Sequence operations > Treating sequences as stacks
Prev:pop ( seq -- elt )


Vocabulary
sequences

Inputs and outputs
seqa resizable mutable sequence


Word description
Removes the last element and shortens the sequence.

Side effects
Modifies seq

Errors
Throws an error if the sequence is empty.

See also
pop

Definition
USING: kernel math ;

IN: sequences

: pop* ( seq -- ) [ length 1 - ] [ shorten ] bi ;