WLJS LogoWLJS Notebook

RotateRight

RotateRight[expr, n] cycles the elements in expr n positions to the right.

RotateRight[expr] cycles one position to the right.

Examples

Rotate right by 1:

RotateRight[{a, b, c, d, e}]
(* {e, a, b, c, d} *)

Rotate right by 2:

RotateRight[{a, b, c, d, e}, 2]
(* {d, e, a, b, c} *)

Please visit the official Wolfram Language Reference for more details.

On this page