K9 Public Docs

APL One‑Page Cheat Sheet

Print‑ready and minimal. Return to the full guide in index.html.

Array Basics

⍳nGenerate 1…n
⍴AShape of A
m n⍴AReshape A
,ARavel (flatten)
A,BCatenate

Structural

n↑ATake
n↓ADrop
⌽AReverse
⊂AEnclose
⊃ADisclose / pick

Arithmetic

A+BElement‑wise add
A×BElement‑wise multiply
A÷BElement‑wise divide
|AAbsolute value
⌈A / ⌊ACeiling / floor

Reductions

+/ASum
×/AProduct
⌈/AMax
⌊/AMin
+\APrefix sums

Comparisons

A=BEqual
A≠BNot equal
A<B / A>BLess / greater
A≤B / A≥BLess‑eq / greater‑eq
A≡BMatch

Strings + I/O

S ⍷ TFind substring
⍕AFormat to string
⎕UCS AUnicode codepoints
⎕JSON AEncode JSON
0 ⎕JSON SDecode JSON

Idioms

(A>0)/AFilter by mask
⌽⍳nReverse range
2 3⍴⍳6Matrix
+/AReduce with +
+\AScan with +