miniapl

— Reverse / Rotate last

⌽Y reverses the last axis. [K] selects the axis.

⌽1 2 3             ⍝ 3 2 1
⌽[1]2 2⍴⍳4         ⍝ 2 2⍴3 4 1 2

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 .