Behaviour of defparameter used with list
|Added at||2016-12-19 01:12|
So I encountered a rather strange behaviour that I couldn't explain/understand with what I googled so far nor the Gigamonkeys Book.
I tracked my problem down to the following minimal programm:
So as you can see the snippet defines a parameter and 2 nested functions. The toplevel function f1 creates a binding via let and calls the inner function f2, which just does some arbitrary arithmetic and assigns new values to global parameter's elements.
So my question is: Why does the output change from function call to function call? I have no idea what causes this behaviour. I'm probably overlooking something obvious right now, but please could someone point out what this is?
Or is it just that one shouldn't use lists for dynamically scoped variables?