RotateRight

RotateRight[expr,n]

cycles the elements in expr n positions to the right.

RotateRight[expr]

cycles one position to the right.

RotateRight[expr,{n1,n2,}]

cycles elements at successive levels ni positions to the right.

Details

Examples

open allclose all

Basic Examples  (4)

Rotate two positions to the right:

In[1]:=
Click for copyable input
Out[1]=

Rotate one position to the right:

In[1]:=
Click for copyable input
Out[1]=

Rotate Association one position to the right:

In[1]:=
Click for copyable input
Out[1]=

Rotate Association on the first and second levels:

In[1]:=
Click for copyable input
Out[1]=

Generalizations & Extensions  (2)

Applications  (4)

See Also

RotateLeft  Reverse  PadRight  BitShiftRight

Tutorials

Introduced in 1988
(1.0)