ilo 26.5.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
-- fmod: floor-mod, always non-negative when divisor is positive.
-- Eliminates the (raw + 7) % 7 workaround needed with signed `mod`.

-- Weekday normalisation: map any integer offset to 0..6 without workaround.
weekday offset:n>n;fmod offset 7

-- Circular ring position (e.g. hour hand on a 12-hour clock).
ring-pos n:n steps:n>n;fmod n steps

-- run: weekday -1
-- out: 6
-- run: weekday 8
-- out: 1
-- run: ring-pos -3 12
-- out: 9
-- run: ring-pos 14 12
-- out: 2