lastn ( seq n -- elts... )


Vocabulary
sequences.generalizations

Inputs
seqa sequence
nan integer


Outputs
elts...n elements on the datastack


Word description
A generalization of last and last2 that pushes the last n elements of a sequence on the stack.

Examples
Some core words expressed in terms of lastn:
last1 lastn
last22 lastn


Definition