Files
Toy/scripts/funky.toy
Kayne Ruse 9fe6d6b218 WIP bad approach, read more
I build a self-referential system, then tried to copy only parts. I need
to step back and adjust my approach.

'Toy_private_deepCopyValue' and 'Toy_private_deepCopyScope' need to be
ripped out, and I need to simply accept there will be only one instance
of 'Toy_Bucket' that isn't freed until the top-level VM is.

I need an hour's break before I'll tackle this again.

See #163
2025-02-18 13:06:15 +11:00

16 lines
206 B
Plaintext

//TODO: Not yet functional
fn makeCounter() {
var counter: int = 0;
fn increment() {
return counter++;
}
return increment;
}
var tally = makeCounter();
print tally();
print tally();
print tally();