Closed TheLoneWolfling closed 8 years ago
Found the problem:
This is a problem with doing things lazily - in this case, binding late. What's happening is that nothing ever actually goes over the array to substitute variables for their values. I.e. here.
I see, so the let_bind functions store x and y as references to the function parameters inside the scope of the function, but when that value is returned the scope is lost and those variables loose meaning. That's slightly painful, but I think what needs to be done is to replace those variables with the values before exiting the function scope, and thankfully we have acess to both the value and the scope around line 136 in execute.c.
For reference:
Previously:
Now: