ilo 0.11.1

ilo — a programming language for AI agents
Documentation
-- Lists: ordered same-type collections. Pass as [1,2,3] on the CLI.
-- Index access xs.0, xs.1 etc. are safe expression endings (not Ref, no greedy parsing).

-- First element via index (safe — xs.0 is an index expression, not a bare Ref)
fst xs:L n>n;xs.0

-- Third element (safe — index expression)
thr xs:L n>n;xs.2

-- Square each element, return last squared value. Bind the loop's value to
-- `r` so the function's syntactic tail is an expression — top-level
-- auto-print only fires when the tail is a value expression, never when
-- the function body ends with a bare loop.
sq-last xs:L n>n;r=0;@x xs{r=*x x};+r 0

-- Length of list (last function — bare call safe at EOF)
sz xs:L n>n;len xs

-- run: fst [10,20,30]
-- out: 10
-- run: thr [10,20,30]
-- out: 30
-- run: sq-last [3,4,5]
-- out: 25
-- run: sz [1,2,3,4,5]
-- out: 5