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 positions to the right.

DetailsDetails

ExamplesExamplesopen allclose all

Basic Examples  (4)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]=
Introduced in 1988
(1.0)