Handbook
Glossary
set-lastn ( elts... seq n -- )
Vocabulary
sequences
.
generalizations
Inputs
elts...
n
elements on the datastack
seq
a
sequence
n
an
integer
Outputs
None
Word description
A generalization of
set-last
that sets the last
n
elements of a sequence from the top
n
elements of the stack.
Definition
USING:
kernel
sequences
;
IN:
sequences.generalizations
:
set-lastn
( elts... seq n -- )
[
tail-slice*
]
[
set-firstn-unsafe
]
bi
;
inline