Handbook
Glossary
nreverse ( n -- quot )
Vocabulary
shuffle
Inputs
n
an
integer
Outputs
None
Word description
Reverses the order of the top
n
stack elements.
Examples
USING: arrays shuffle prettyprint ; 10 20 30 40 4 nreverse 4array .
{ 40 30 20 10 }
Definition
USING:
generalizations
kernel
ranges
sequences
;
IN:
shuffle
MACRO:
nreverse
( n -- quot )
0
[a..b)
[
[
-nrot
]
curry
]
map
[
]
concat-as
;