rotate

Revision as of 16:54, 16 April 2022 by Razetime (talk | contribs) (add k3 rotate)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Rotate
x!y
Supported in K3

Rotate[1] is a verb that rotates an array y by the number of elements given in x.

Positive x rotates left, and negative x rotates right.

  2! 1 2 3 4 5 6 7
3 4 5 6 7 1 2
  -2! 1 2 3 4 5 6 7
6 7 1 2 3 4 5
Works in: Kona

References