APL Symbols, Primitives & Keyboard Shortcuts
Complete reference for 65+ APL and mAPL primitive functions and operators. Type symbols in APL Run using the backtick prefix key (e.g. `r for ⍴, `i for ⍳) or two-character Tab completion (e.g. rr + Tab for ⍴).
Mathematics
| Symbol | Name | Monadic (1-Arg) | Dyadic (2-Arg) |
|---|---|---|---|
+ |
Plus | Conjugate — +3.5 → 3.5 |
Add — 2+3 → 5 |
- |
Minus | Negate — -5 → ¯5 |
Subtract — 7-3 → 4 |
× |
Times | Signum (direction) — ׯ3 0 5 → ¯1 0 1 |
Multiply — 3×4 → 12 |
÷ |
Divide | Reciprocal — ÷4 → 0.25 |
Divide — 10÷3 → 3.333 |
* |
Star | Exponential (e*) — *1 → 2.718 |
Power — 2*10 → 1024 |
⍟ |
Log | Natural log — ⍟2.718 → ≈1 |
Logarithm — 10⍟100 → 2 |
| |
Stile | Magnitude (abs) — |¯7 → 7 |
Residue (mod) — 3|7 → 1 |
⌈ |
Upstile | Ceiling — ⌈3.2 → 4 |
Maximum — 5⌈3 → 5 |
⌊ |
Downstile | Floor — ⌊3.8 → 3 |
Minimum — 5⌊3 → 3 |
! |
Exclamation | Factorial — !5 → 120 |
Binomial — 2!5 → 10 |
○ |
Circle | Pi times (π×) — ○1 → 3.14159… |
Trig functions — 1○0.5 → sin 0.5 |
? |
Question | Roll (random) — ?6 → 1..6 |
Deal — 3?10 → 3 unique from 1..10 |
⊥ |
Up Tack | — | Decode (base) — 2⊥1 0 1 → 5 |
⊤ |
Down Tack | — | Encode (repr) — 2 2 2⊤5 → 1 0 1 |
⌹ |
Domino | Matrix inverse — ⌹M → M⁻¹ |
Matrix divide — A⌹B → least-squares solve |
Logic & Comparison
| Symbol | Name | Monadic (1-Arg) | Dyadic (2-Arg) |
|---|---|---|---|
= |
Equal | — | Equal — 3=3 → 1 |
≠ |
Not Equal | Unique mask — ≠1 1 2 3 → 1 0 1 1 |
Not equal — 3≠4 → 1 |
< |
Less Than | — | Less than — 2<5 → 1 |
≤ |
Less Or Equal | — | Less or equal — 3≤3 → 1 |
> |
Greater Than | — | Greater than — 5>2 → 1 |
≥ |
Greater Or Equal | — | Greater or equal — 5≥5 → 1 |
∨ |
Or | — | Or / GCD — 12∨8 → 4 |
^ |
And | — | And / LCM — 1^0 → 0 |
⍲ |
Nand | — | Nand — 1⍲1 → 0 |
⍱ |
Nor | — | Nor — 0⍱0 → 1 |
~ |
Tilde | Not — ~1 0 1 → 0 1 0 |
Without — 1 2 3 4 5~3 4 → 1 2 5 |
Structural
| Symbol | Name | Monadic (1-Arg) | Dyadic (2-Arg) |
|---|---|---|---|
⍴ |
Rho | Shape — ⍴ 1 2 3 → 3 |
Reshape — 2 3⍴⍳6 → 2×3 matrix |
⍉ |
Transpose | Transpose — ⍉ 2 3⍴⍳6 |
Dyadic transpose — 2 1⍉M → reorder axes |
, |
Comma | Ravel (flatten) — ,2 3⍴⍳6 → 1..6 |
Catenate — 1 2,3 4 → 1 2 3 4 |
⍪ |
Comma Bar | Table — ⍪1 2 3 → column |
Catenate first — M⍪N → stack vertically |
⌽ |
Circle Stile | Reverse — ⌽1 2 3 → 3 2 1 |
Rotate — 2⌽1 2 3 4 → 3 4 1 2 |
⊖ |
Circle Bar | Reverse first — ⊖M → flip rows |
Rotate first — 1⊖M → rotate rows |
⊂ |
Left Shoe | Enclose — ⊂1 2 3 → ⊂ vector |
Partitioned enclose — 1 0 1⊂⍳4 → (1 2)(3 4) |
⊆ |
Left Shoe Bar | Nest — ⊆1 2 3 → ⊂ 1 2 3 |
Partition — 1 0 1⊆⍳3 → (1)(3) |
⊃ |
Right Shoe | Disclose (first) — ⊃ 1 2 3 → 1 |
Pick — 2⊃10 20 30 → 20 |
Selection & Search
| Symbol | Name | Monadic (1-Arg) | Dyadic (2-Arg) |
|---|---|---|---|
↑ |
Up Arrow | Mix — ↑(1 2)(3 4) → matrix |
Take — 3↑1 2 3 4 5 → 1 2 3 |
↓ |
Down Arrow | Split — ↓2 3⍴⍳6 → nested rows |
Drop — 2↓1 2 3 4 5 → 3 4 5 |
⌷ |
Squad | Materialise — ⌷⍳5 → 1 2 3 4 5 |
Index — 2⌷10 20 30 → 20 |
∊ |
Epsilon | Enlist — ∊(1 2)(3 4) → 1 2 3 4 |
Membership — 3∊1 2 3 4 → 1 |
⍷ |
Epsilon Bar | — | Find — 2 3⍷⍳5 → 0 1 0 0 0 |
∪ |
Union | Unique — ∪1 1 2 3 3 → 1 2 3 |
Union — 1 2 3∪3 4 5 → 1 2 3 4 5 |
∩ |
Intersection | — | Intersection — 1 2 3∩2 3 4 → 2 3 |
⍳ |
Iota | Index generator — ⍳5 → 1 2 3 4 5 |
Index of — 10 20 30⍳20 → 2 |
⍸ |
Iota Bar | Where — ⍸1 0 1 0 1 → 1 3 5 |
Interval index — 10 20 30⍸15 → 1 |
⍋ |
Grade Up | Grade up — ⍋3 1 2 → 2 3 1 |
Grade up (coll.) |
⍒ |
Grade Down | Grade down — ⍒3 1 2 → 1 3 2 |
Grade down (coll.) |
≡ |
Match | Depth — ≡(1 2)(3 4) → 2 |
Match — (⍳3)≡⍳3 → 1 |
≢ |
Not Match | Tally (count) — ≢⍳5 → 5 |
Not match — (⍳3)≢⍳4 → 1 |
Operators
| Symbol | Name | Monadic (1-Arg) | Dyadic (2-Arg) |
|---|---|---|---|
¨ |
Diaeresis | — — ⍴¨(⍳3)(⍳5) → 3 5 |
Each — ⍴¨(⍳3)(⍳5) → 3 5 |
⍨ |
Tilde Diaeresis | — — -⍨5 → 0 |
Commute / selfie — 3-⍨5 → 2 |
⍣ |
Star Diaeresis | — — (+∘1)⍣5⊢0 → 5 |
Power operator — (+∘1)⍣5⊢0 → 5 |
/ |
Slash | — — +/1 2 3 → 6 |
Reduce / Replicate — 1 0 1/10 20 30 → 10 30 |
\ |
Backslash | — — +\1 2 3 → 1 3 6 |
Scan / Expand — 1 0 1\10 20 → 10 0 20 |
⌿ |
Slash Bar | — — +⌿M → col sums |
Reduce first — +⌿M → col sums |
⍀ |
Slope Bar | — — +⍀M → col scans |
Scan first / Expand first — +⍀M → col scans |
∘ |
Jot | — — (⍳3)∘.×⍳3 |
Beside / Bind / Outer — (⍳3)∘.×⍳3 |
. |
Dot | — — 1 2+.×3 4 → 11 |
Inner product — 1 2+.×3 4 → 11 |
⍤ |
Jot Diaeresis | — — +⍤1⊢M → row sums |
Rank operator — +⍤1⊢M → row sums |
⍥ |
Circle Diaeresis | — — 2+⍥⍟3 → ln(e²×e³) |
Over — 2+⍥⍟3 → ln(e²×e³) |
@ |
At | — — (10@2 4)⍳5 → 1 10 3 10 5 |
At (selective) — (10@2 4)⍳5 → 1 10 3 10 5 |
⌸ |
Quad Equal | — — {⍺ ⍵}⌸ 1 1 2 3 |
Key (group-by) — {⍺ ⍵}⌸ 1 1 2 3 |
⌺ |
Quad Diamond | — — {+/⍵}⌺3⊢⍳5 → rolling sum |
Stencil (window) — {+/⍵}⌺3⊢⍳5 → rolling sum |
⍠ |
Quad Colon | — — f⍠g → dispatch / try-catch |
Variant / Try-Catch — f⍠g → dispatch / try-catch |
|> |
Pipeline | — — 1 2 3 |> { +/⍵ } → 6 |
Pipeline forward — 1 2 3 |> { +/⍵ } → 6 |
▷ |
Triangle Pipeline | — — 1 2 3 ▷ { +/⍵ } → 6 |
Pipeline forward — 1 2 3 ▷ { +/⍵ } → 6 |
?. |
Safe Access | — — cfg?.db?.port |
Optional chaining — cfg?.db?.port |
?? |
Nullish Coalesce | — — cfg?.port ?? 8080 |
Nullish fallback — cfg?.port ?? 8080 |
Miscellaneous
| Symbol | Name | Monadic (1-Arg) | Dyadic (2-Arg) |
|---|---|---|---|
← |
Left Arrow | — — x←42 |
Assign — x←42 |
→ |
Right Arrow | Type Arrow / Branch — add :: num, num → num |
Type signature arrow / Branch |
⋄ |
Diamond | — — a←1 ⋄ b←2 |
Statement sep. — a←1 ⋄ b←2 |
¯ |
High Minus | Negative literal — ¯3 + 5 → 2 |
— |
⍺ |
Alpha | Left argument — {⍺+⍵} |
— |
⍵ |
Omega | Right argument — {⍺+⍵} |
— |
⍝ |
Lamp | Comment — ⍝ this is a comment |
— |
⍕ |
Thorn | Format — ⍕42 → '42' |
Format (spec) — 5 2⍕3.14 → ' 3.14' |
⍎ |
Hydrant | Execute — ⍎'1+2' → 3 |
— |
⊢ |
Right Tack | Identity — ⊢ 5 → 5 |
Right — 3⊢5 → 5 |
⊣ |
Left Tack | Same — ⊣ 5 → 5 |
Left — 3⊣5 → 3 |
∇ |
Del | Define tradfn — ∇ R←F X ⋄ R←X+1 ⋄ ∇ |
— |
⎕ |
Quad | System — ⎕←42 → prints 42 |
I/O |
⍞ |
Quote Quad | Char input — ⍞←'hello' |
Char output |