Operator Description Example Result +Add +3 47-Subtract -10 37*Multiply *3 412/Divide /10 25%Modulo %10 31
Operator Description Example Result ==Equal ==a btrue/false!=Not equal !=a btrue/false>Greater than >a btrue/false<Less than <a btrue/false>=Greater or equal >=a btrue/false<=Less or equal <=a btrue/false
Operator Description Example &Logical AND &a b|Logical OR |a b!Logical NOT !a
Function Signature Description Example catt t > tConcatenate two strings cat "hello" " world" → "hello world"lent > nString length len "hello" → 5trmt > tTrim whitespace trm " hi " → "hi"splt t > L tSplit string by delimiter spl "a,b,c" "," → ["a","b","c"]hast t > bCheck if string contains substring has "hello" "ell" → truergxt t > L tRegex match (returns captures) rgx "abc123" "[0-9]+" → ["123"]fmtt ... > tFormat string with values fmt "{} is {}" "sky" "blue"
Function Alias Signature Description Example lenlengthL _ > nList length len [1,2,3] → 3hdheadL _ > _First element hd [1,2,3] → 1tltailL _ > L _All elements except first tl [1,2,3] → [2,3]revreverseL _ > L _Reverse a list rev [1,2,3] → [3,2,1]srtsortL _ > L _Sort a list srt [3,1,2] → [1,2,3]srtsortfn L _ > L _Sort by key function srt cmp xsslcsliceL _ n n > L _Slice (start, end) slc [1,2,3,4] 1 3 → [2,3]flatflattenL L _ > L _Flatten nested lists flat [[1,2],[3]] → [1,2,3]unquniqueL _ > L _Remove duplicates unq [1,2,2,3] → [1,2,3]hascontainsL _ _ > bCheck if list contains element has [1,2,3] 2 → true
Function Alias Signature Description Example mapfn L _ > L _Apply function to each element map dbl [1,2,3]fltfilterfn L _ > L _Keep elements where function returns true flt pos [1,-2,3]fldfoldfn _ L _ > _Reduce list to single value fld add 0 [1,2,3]grpgroupfn L _ > M t L _Group elements by function result grp cat xs
Function Signature Description Example sumL n > nSum a list of numbers sum [1,2,3] → 6avgL n > nAverage of a list of numbers avg [2,4,6] → 4
Function Signature Description Example mmap> MCreate empty map m=mmapmgetM t > _Get value by key mget m "key"msetM t _ > MSet key-value pair mset m "key" valmhasM t > bCheck if key exists mhas m "key"mkeysM > L tGet all keys mkeys mmvalsM > L _Get all values mvals mmdelM t > MRemove key, return new map mdel m "key"
Function Signature Description Example str_ > tConvert to string str 42 → "42"numt > nParse string to number num "42" → 42absn > nAbsolute value abs -5 → 5flrn > nFloor flr 3.7 → 3celn > nCeiling cel 3.2 → 4rndn n > nRound to N decimal places rnd 3.14159 2 → 3.14
Function Signature Description Example gett > R t tHTTP GET (returns Result) get "https://..."$t > R t tHTTP GET shorthand (sugar for get) $"https://..."postt t > R t tHTTP POST (url, body) post url bodygett M > R t tHTTP GET with headers get url headerspostt t M > R t tHTTP POST with headers post url body headersrdt > R t tRead file rd "data.txt"rdt t > R t tRead file with format rd "data.csv" "csv"wrt t > R t tWrite file (path, content) wr "out.txt" datawrt t t > R t tWrite file with format wr "out.json" data "json"envt > R t tRead environment variable env "API_KEY"
Note: $ is syntactic sugar -$url compiles to get url. HTTP builtins (get, $, post) require the native binary; they are not available in the npm/WASM build.
Function Signature Description Example rdbt t > R _ tParse data (format: "json", "csv") rdb data "json"jptht t > R t tExtract JSON path jpth data "users.0.name"jdmp_ > tDump value as JSON string jdmp [1,2,3]jpart > R _ tParse JSON string to value jpar '{"a":1}'
Function Signature Description Example prnt_ > _Print value and return it prnt "hello"
Function Signature Description Example now> nCurrent Unix timestamp (seconds) now
Any function returning R (Result) can be called with ! to auto-unwrap:
r =$ url -- r is R t t (Result)
v =$! url -- v is t (auto-unwrapped, propagates error)
data = rdb ! r "json" -- auto-unwrap parse result
See Error Handling for full details on !, ?, ??, and Result types.
Access list elements and record fields with .:
xs . 0 -- first element of list xs
user . name -- field "name" of record/map
data . users . 0 -- chained access
Safe navigation with .? returns nil instead of erroring on missing keys:
user .? email -- nil if "email" doesn't exist
All builtins accept long-form names that resolve to the canonical short form. ilo will emit a hint suggesting the short form:
Long form Short form lengthlenheadhdtailtlreverserevsortsrtsliceslcuniqueunqfilterfltfoldfldflattenflatconcatcatcontainshasgroupgrpaverageavgprintprnttrimtrmsplitsplformatfmtregexrgxreadrdwritewrreadbufrdbfloorflrceilcelroundrndstringstrnumbernum