⍝ Rotate along first axis as in (1 ⊖ A)

⍝ scalars
⎕ ← 1 ⊖ 13           ⍝ --> 13
⎕ ← 34 ⊖ 13          ⍝ --> 13
⎕ ← ¯2 ⊖ 13          ⍝ --> 13

⍝ vectors

⎕ ← 1 ⊖ 1 2 3        ⍝ --> 2 3 1
⎕ ← 4 ⊖ 1 2 3        ⍝ --> 2 3 1
⎕ ← ¯1 ⊖ 1 2 3       ⍝ --> 3 1 2
⎕ ← 0 ⊖ 1 2 3        ⍝ --> 1 2 3

⍝ multi-dimensional arrays
A ← 3 4 ⍴ ⍳ 9

⎕ ← 1 ⊖ A            ⍝ -->   5 6 7 8
                     ⍝       9 1 2 3
                     ⍝       1 2 3 4

⎕ ← 4 ⊖ A            ⍝ -->   5 6 7 8
                     ⍝       9 1 2 3
                     ⍝       1 2 3 4

⎕ ← ¯1 ⊖ A           ⍝ -->   9 1 2 3
                     ⍝       1 2 3 4
                     ⍝       5 6 7 8

⎕ ← ¯4 ⊖ A           ⍝ -->   9 1 2 3
                     ⍝       1 2 3 4
                     ⍝       5 6 7 8

⎕ ← 0 ⊖ A            ⍝ -->   1 2 3 4
                     ⍝       5 6 7 8
                     ⍝       9 1 2 3

⍝ rotating empty vectors

⎕ ← ¯2 ⊖ ⍬           ⍝ --> [0]()
⎕ ← 11 ⊖ ⍬           ⍝ --> [0]()
⎕ ← 0 ⊖ ⍬            ⍝ --> [0]()

⎕ ← 12 ⊖ 0 ↑ A       ⍝ --> [0,4]()

0