ELLDER054/gizmo-lang

Appending to a list messes up the length of that list.

Closed this issue · 0 comments

Take this piece of code:

int[] a = [1, 2, 3];
write(len(a));
write(", ");
append(a, 4);
write(len(a));

It prints:

3, 3

But we add one extra element to the list before we print the length for the second time, so the second number should be 4.