⌽ — Reverse / Rotate

Function. Keys: Alt-2. Ranks: 1 monadic, 0 1 dyadic

⌽Y reverses the last axis. ⌽⍠K selects the axis.

⌽1 2 3             ⍝ 3 2 1
⌽⍠0 (2 2⍴⍳4)        ⍝ [2 3⋄0 1]

N⌽Y rotates left by N places; negative N rotates right. Integral counts cycle modulo axis length.

1⌽"abcd"           ⍝ "bcda"
¯1⌽"abcd"          ⍝ "dabc"

A count array supplies counts for the unrotated axes. See ⊖.

Inverse

⌽⁻¹Y is ⌽Y. X⌽⁻¹Y rotates Y back by X.

1⌽⁻¹2 3 1   ⍝ 1 2 3