push ( elt seq -- )
Factor handbook » The language » Collections » Sequence operations » Treating sequences as stacks

Next:push-all ( src dst -- )


Vocabulary
sequences

Inputs
eltan object
seqa resizable mutable sequence


Outputs
None

Word description
Adds an element at the end of the sequence. The sequence length is adjusted accordingly.

Errors
Throws an error if seq is not resizable, or if the type of elt is not permitted in seq.

Side effects
Modifies seq

See also
push-either, push-when, pop, pop*, prefix, suffix, suffix!

Definition