ilo 0.11.5

ilo — a programming language for AI agents
Documentation
-- frq xs:L a > M _ n — frequency map: count occurrences of each element.
-- Keys preserve the element type: text inputs produce text keys, number
-- inputs produce number keys (floats floor to i64). This avoids the routing
-- tax of `k=str j` before every `mget`/`mset` iteration.
--
-- Heterogeneous-type collisions: with typed keys, `1` and `"1"` are now
-- distinct keys (Int(1) vs Text("1")). Numeric floats floor to i64 at the
-- builtin boundary, matching `at xs i`.

-- Word frequency in a sentence.
words>n;m=frq ["the","cat","sat","on","the","mat","the","cat"];r=mget m "the";?r{n v:v;_:0}

-- Character frequency (split a string into chars, then count).
cfrq>n;m=frq (spl "mississippi" "");r=mget m "s";?r{n v:v;_:0}

-- Number frequency: numeric keys preserve their type (no stringification).
nums>n;m=frq [1,2,1,3,1,2];r=mget m 1;?r{n v:v;_:0}

-- run: words
-- out: 3
-- run: cfrq
-- out: 4
-- run: nums
-- out: 3