RotateRight¶
Status: Stable
documented, exercised by the test suite and/or worked examples, with no known limitations recorded.
Description¶
RotateRight[expr, n]
rotates the elements of expr n positions to the right.
Examples (1)¶
Every input below was run against the current Mathilda build and its output recorded.
Applications (1)¶
Implementation notes¶
Algorithm. builtin_rotateright cyclically shifts elements toward the back by n (default
1). It negates the shift spec (an integer or a per-level List of integers) and delegates to
the same rotate_rec worker used by RotateLeft, so the offset wrapping and per-level nested
behaviour are identical with the opposite sign.
Attributes: Protected.
References¶
See also: RotateLeft
- Source:
src/info.c - Specification:
docs/spec/builtins/structural-manipulation.md - Tests:
tests/test_assoc_read.c - Tests:
tests/test_compiledfunction.c - Tests:
tests/test_list.c - Tests:
tests/test_ndarray_selection.c
Notes & additional examples¶
Notes¶
Cyclically shifts elements n positions to the right; it is the inverse of RotateLeft.