Add set index in list, and update lib+examples+tests

This commit is contained in:
Neemek 2026-08-20 13:44:10 +02:00
parent 09ac16a42d
commit 3bccc227ba
Signed by: neemek
GPG key ID: 84FFE4D7D40AB25E
12 changed files with 117 additions and 60 deletions

View file

@ -3,14 +3,9 @@
fn range(from: int, to: int) -> (fn() -> (int, bool)) {
i := from - 1
end := to - 1
fn() -> (int, bool) {
if i < end {
(i = i+1, true)
} else {
(-1, false)
}
(i = i+1, i+1 < to)
}
}