

# `⌽` — Reverse / Rotate

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

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

``` bpl
⌽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.

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

A count array supplies counts for the unrotated axes. See
[`⊖`](circle-bar.qmd).

## Inverse

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

``` bpl
1⌽⁻¹2 3 1   ⍝ 1 2 3
```
