Lyric
A statically typed application language with a bytecode VM — standalone, and embeddable in a host with a capability-based sandbox.
What changed in v3.4.0 — 2026-08-24
Added
A chain can be started from an array, a range, or a table with holes in it.
std.itergains four entrances:over(xs).map(f) // an array range(1, 4) // what '1..4' walks in a loop rangeInclusive(1, 4) // what '1..=4' walks compact(slots).map(f) // the non-null values of a '(?T)[]'The adapters have been methods since 2.17, but the three built-in forms could not start a pipeline: an array and a string have no declaration to hang an
Iterableconformance on, and a range is not a value at all —a..bis a loop head, so(a..b).iter()is not something that could exist. Naming the machinery by hand was the alternative, and a class literal with two fields reads worse than the loop it replaces.rangeInclusiveis its own function rather thanrange(low, high + 1), for the reason the two adapters behind it are separate: at the type's maximum that+ 1wraps and the chain yields nothing.compacttakes an ARRAY, not an iterator, and that is the whole design. AnIterator<?T>cannot exist —next()answers?Tand spendsnullon "the end", so an optional element would need??T, and?does not nest. Reading the slots directly is what makes the distinction available. It is lazy like every other adapter.