nrot ( n -- quot )
Factor handbook » The language » Combinators » Generalized shuffle words and combinators » Generalized shuffle words

Prev:npick ( n -- quot )
Next:-nrot ( n -- quot )


Vocabulary
generalizations

Inputs
nan integer


Outputs
None

Word description
A generalization of rot that works for any number of items on the stack.

Examples
USING: arrays generalizations kernel prettyprint ; 1 2 3 4 4 nrot 4array .
{ 2 3 4 1 }

Some core words expressed in terms of nrot:
swap2 nrot
rot3 nrot


Definition