push onto list
Description
L push(L, x1, x2, ..., xn)
push(L, x1, x2, …, xn) pushes x1, x2, …, onto the left end of L. Values are pushed in order from left to right, so xn becomes the first (leftmost) value of L. push(L) with no second argument pushes a null value onto L.
Parameters
- L
- a list that is a stack
- x1…xn
- elements to put on the stack
- returns
- the updated stack
Defaults
- x1
- &null
Errors
See Also
- get — get value from list
- pop — pop from list
- pull — pull from list
- put — put onto list