Wolfram: RotateLeft
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} *)
RotateLeftshift all elements to the left, first item is moved to last.
RotateRightshift all elements to the right, last item is moved to first.
RotateRight[ {1, 2, 3, 4} ] (* {4, 1, 2, 3} *)