roll

Input Stack:
N
a0
...
aN
 
Output Stack:
aN-1
a0
...
aN-2
aN

Rotate an item in the stack and put it on the top.

Since: 1.5.0

Example:

a,0,:roll
PosInputOutput
0 0 a
1 a
a,b,0,:roll
PosInputOutput
0 0 b
1 b a
2 a
a,b,1,:roll
PosInputOutput
0 1 a
1 b b
2 a