RotateLeft

RotateLeft[expr,n]

cycles the elements in expr n positions to the left.

RotateLeft[expr]

cycles one position to the left.

RotateLeft[expr,{n1,n2,}]

cycles elements at successive levels ni positions to the left.

Details

Examples

open allclose all

Basic Examples  (4)

Rotate two positions to the left:

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

Rotate one position to the left:

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

Rotate Association one position to the left:

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

RotateRight  Reverse  PadLeft  BitShiftLeft

Tutorials

Introduced in 1988
(1.0)
| Updated in 2003
(5.0)