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:

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:

Applications  (4)

Successively rotate a list right:

Rotate successive rows of a matrix by their row number:

Rotate a 2D image:

Rotate operands:

Wolfram Research (1988), RotateRight, Wolfram Language function, https://reference.wolfram.com/language/ref/RotateRight.html (updated 2003).

Text

Wolfram Research (1988), RotateRight, Wolfram Language function, https://reference.wolfram.com/language/ref/RotateRight.html (updated 2003).

CMS

Wolfram Language. 1988. "RotateRight." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2003. https://reference.wolfram.com/language/ref/RotateRight.html.

APA

Wolfram Language. (1988). RotateRight. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/RotateRight.html

BibTeX

@misc{reference.wolfram_2024_rotateright, author="Wolfram Research", title="{RotateRight}", year="2003", howpublished="\url{https://reference.wolfram.com/language/ref/RotateRight.html}", note=[Accessed: 22-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_rotateright, organization={Wolfram Research}, title={RotateRight}, year={2003}, url={https://reference.wolfram.com/language/ref/RotateRight.html}, note=[Accessed: 22-November-2024 ]}