ilo 0.12.0

ilo - the token-minimal programming language AI agents write
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
-- Dot-index for lists: `xs.0` is sugar for `at xs 0`.
-- Works for literal indices (`xs.0`, `xs.2`) and variable indices (`xs.i`)
-- when `i` is a bound variable in scope. The variable-index form desugars to
-- `at xs i` after parse, so it works identically on every engine.

frst xs:L n>n;xs.0
thrd xs:L n>n;xs.2
nest>n;xss=[[1,2],[3,4]];xss.0.1
pick xs:L n i:n>n;xs.i

-- run: frst [10,20,30]
-- out: 10
-- run: thrd [10,20,30]
-- out: 30
-- run: nest
-- out: 2
-- run: pick [10,20,30] 1
-- out: 20