Wolfram: RotateLeft

By Xah Lee. Date: .

RotateLeft

RotateLeft

shift all elements to the left, first item is moved to last.

RotateRight

shift all elements to the right, last item is moved to first.

RotateRight[ {1, 2, 3, 4} ]

(* {4, 1, 2, 3} *)

Wolfram. List Operations, and Loop, Iteration, Recursion