ListTools
Rotate
rotate the elements in a list
Calling Sequence
Parameters
Description
Examples
Rotate(L, N)
L
-
list
N
integer
The Rotate(L, N) function rotates the elements in list L by N positions.
In the special case where L contains no elements, is returned.
L≔1,2,3,4,5,6,7,8,9,10
with⁡ListTools:
Rotate⁡L,1
2,3,4,5,6,7,8,9,10,1
Rotate⁡L,3
4,5,6,7,8,9,10,1,2,3
Rotate⁡L,−3
8,9,10,1,2,3,4,5,6,7
Rotate⁡L,−12
9,10,1,2,3,4,5,6,7,8
See Also
type[list]
Download Help Document