l>

documentation

Reference card

Every l primitive on one page — monadic and dyadic glyphs, keyword verbs, types, and which ones compute directly on compressed data.

Every l primitive on one page. Each glyph has a monadic and a dyadic meaning; monadic primitives are invoked by keyword (first, reverse, …), dyadic ones by the infix glyph. Read right-to-left, no precedence.

CoC — does it avoid decompressing? = computes on the encoding or reads the header (no full decode); - = materialises first. Compound cells are monadic / dyadic.

Glyphs

GlyphMonadicDyadicCoC
::identity — return xassign-through (returns y)- / -
+flip — transposeadd- / ✓
-neg — negatesubtract✓ / ✓
*first — headmultiply✓ / ✓
%reciprocal — 1%xfloat divide✓ / ✓
&where — mask → indiceslesser / and✓ / ✓
|reversegreater / or✓ / ✓
^null — null maskfill nulls✓ / ✓
=group — value → indicesequal✓ / ✓
<iasc — grade upless-than✓ / ✓
>idesc — grade downgreater-than✓ / ✓
$string — formatcast / pad; float matmul- / ✓
,enlistjoin✓ / ✓
#counttake / reshape✓ / ✓
_floordrop / cut✓ / ✓
~notmatch (identical?)✓ / ✓
!key — dict keysbuild dict / enum✓ / ✓
?distinctfind index; roll✓ / ✓
@typeindex / apply✓ / ✓
.value — evalapply / deep-index- / -

0: 1: 2: are the text/CSV, fixed-width, and dynamic-load I/O glyphs (all materialise).

Math & statistics

VerbMeaningCoC
neg absnegate / absolute value
sqrt exp logroot / eˣ / natural log
sin cos tan asin acos atan sinh cosh tanhtrig & hyperbolic (radians)
reciprocal floor1%x / round toward −inf
divx div y — integer floor-division
xexpx xexp y — power xʸ-
sum prd avgtotal / product / mean
min maxextrema (O(1) from header bounds)
medmedian-
var devvariance / std-dev (population)
svar sdevsample variance / std-dev
cov corcovariance / correlation
wsum wavgweighted sum / mean
sums prds mins maxsrunning total / product / min / max-
deltas ratios avgssuccessive diffs / ratios / running mean-
mmxw mmnwwindowed running max / min
mmu xmmmatrix multiply A·B / A·Bᵀ (float)-

Lists, search & tables

VerbMeaningCoC
tiltil n — 0..n−1-
countnumber of items
first lasthead / tail
next prevshift ∓1 (0N fill)-
reverse rotatereverse / n rotate x cyclic shift✓ / -
fliptranspose-
enlist razewrap as 1-list / flatten one level✓ / -
where group distinctindices / value→indices / unique
asc desc iasc idescsort / grade, ascending & descending
rank xbarordinal position / w xbar x round down- / ✓
cut sublistn cut x chunk / n sublist x slice-
cross fillsCartesian product / forward-fill nulls-
in within binmembership / range test / binary search
inter union exceptset intersect / union / difference-
key valuedict keys / values✓ / -
keys cols metakey-columns / all-columns / column info
xkey xcolkey a table / rename columns-
xasc xdescsort a table by column(s)
insert upsertappend / add-or-overwrite rows-
fbyfilter-by: per-group aggregate inside where

q-sql: select / exec / update / deletebyfromwhere — templates, read right-to-left.

Text & I/O

VerbMeaningCoC
stringformat any value to characters-
lower upper trimcase / strip blanks-
likeglob match (? *)-
ss ssrsubstring find / replace-
sv vsjoin↔split; base decode↔encode-
set getserialize↔read a value on disk-
read0 0: 1:text lines / CSV / fixed-width binary-

Types

For a type, means XCMP-compressible. Default integer is int (type 1 → -6h).

TypeCharType#LiteralCoC
booleanb−1h0b / 101b
bytex−4h0x00
shorth−5h0h
inti−6h1 (default)
longj−7h1j
reale−8h1e
floatf−9h1.0 / 1f
charc−10h"c" / "abc"-
symbols−11h`a`b`c
timestampp−12h2026.07.01D12:00:00.000000000
monthm−13h2026.07m
dated−14h2026.07.01
datetimez−15h2026.07.01T12:00:00.000
timespann−16h0D01:00:00.000000000
minute · second · timeu · v · t−17h · −18h · −19h12:34 · 12:34:56 · 12:34:56.789
dictionary99h`a`b!1 2-
table98h([]a:1 2)
function100h{x+1}-

0N / 0W are int null / infinity. Temporal null/inf literals do not lex; guid is nyi.

Iterators

GlyphKeywordMeaningCoC
eachapply item-by-item (map)-
\:each-left: x against all of y-
/:each-right: all of x against each y-
’:prioreach item with its predecessor-
/overfold to a single value✓ (inherits folded verb)
\scanrunning fold, keeping every step-
peachparallel each-

Examples

2*3+4                                  / 14 — right-to-left: 2*(3+4)
sum 10+til 1000000                     / 500009500000j — closed form over a compressed column
avg 1 2 3 4                            / 2.5
distinct 1 1 2 3 3                     / 1 2 3
where 1 0 2 0 1                        / 0 2 2 4 — index i repeated x[i] times
5^0N 2 0N                              / 5 2 5 — fill nulls
2 3 5 in 1 2 3 4                       / 110b
var 1 2 3 4 5.0                        / 2f — closed-form stat, stays compressed
cor[1 2 3;2 4 6.0]                     / 1f
(0.1 0.2 0.3;0.4 0.5 0.6) mmu 1 2 3.0  / 1.4 3.2 — matrix · vector
{e%sum e:exp x-max x} 1 2 3 4.0        / softmax in one line
select sum sz by sym from t            / grouped aggregate (q-sql)