cycles the elements in expr n positions to the right.
cycles elements at successive levels ni positions to the right.
Examplesopen allclose all
Basic Examples (4)
Rotate two positions to the right:
Rotate one position to the right:
Rotate Association one position to the right:
Rotate Association on the first and second levels:
Generalizations & Extensions (2)
Rotate one position right at the first level, and left at the second level:
Rotate an expression with any head:
Successively rotate a list right:
Rotate successive rows of a matrix by their row number:
Rotate a 2D image:
Introduced in 1988
Updated in 2003