Lil Quick Reference

Types

typeof False Examples
"number" 0 42 37.5 -29999
"string" "" "foo\nbar"
"list" () 11,22,33 list 3
"dict" ()dict() ("a","b") dict 11,22
"table" n/a table range 2 insert a:1 into 0
"function" n/a on x y do x+y end

Primitives

Valence Purpose
monad arithmetic - ! floor cos sin tan exp ln sqrt mag unit heading
monad reducers count first last sum min max raze
monad data range [0…n) keys list (enlist) rows cols table typeof flip
dyad arithmetic + - * / % (y mod x) ^ (pow) & (min) | (max)
dyad logical < > = (conforming equal) ~ (match) unless (x if y is 0)
dyad string fuse split parse format
dyad data , (concat) @ (index each right) dict take drop limit in
dyad joins join (natural join/zip) cross (cross join/cartesian product)

Flow

Queries

Formatting

A format is %[name]*-0N.DX: * skip, 0 pad, N width.
- is invert char class (ro) or left justify.
.D is decimal places (fc), size of char class (ro), or truncate to D characters.

X Purpose
%nmz Parsing literal %, number of chars read, matches? matches to end?
ro Matching repeat (0 or more in char class), optional (0 or 1 in char class)
sula String string, uppercase string, lowercase string, ASCII chars
bficChH Number bool, float, int, currency (-$1.23), plain currency (-1.23), hex lowercase, hex uppercase
jep Misc. JSON, unix epoch, time-parts {year, month, day, hour, minute, second}
qv Lil quoted Lil string literal, Lil variable name