Files
Toy/scripts/tally.toy
T
Ratstail91 6c055a0435 Implemented garbage collection
As a whole, this is still tentative.
2026-05-08 16:28:12 +10:00

22 lines
225 B
Plaintext

fn makeCounter() {
var counter: Int = 0;
fn increment() {
return ++counter;
}
return increment;
}
var tally = makeCounter();
while (true) {
var result = tally();
print result;
if (result >= 10) {
break;
}
}