tail* ( seq n -- tailseq )
Factor documentation > Factor handbook > The language > Collections > Sequence operations > Subsequences and slices
Prev:head* ( seq n -- headseq )
Next:rest ( seq -- tailseq )


Vocabulary
sequences

Inputs and outputs
seqa sequence
na non-negative integer
tailseqa new sequence


Word description
Outputs a new sequence consisting of the last n elements of the input sequence.

Errors
Throws an error if the index is out of bounds.

Definition
USING: sequences.private ;

IN: sequences

: tail* ( seq n -- tailseq ) from-end tail ;