WLJS LogoWLJS Notebook

RotateLeft

RotateLeft[expr, n] cycles the elements in expr n positions to the left.

RotateLeft[expr] cycles one position to the left.

Examples

Rotate left by 1:

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

Rotate left by 2:

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

Please visit the official Wolfram Language Reference for more details.

On this page