Open skx opened 1 year ago
Closures don't work as they should:
(set! foo 1) (set! bar (fn* () (set! foo (+ foo 1) true) foo)) (set! foo 99) (print "Value should be two: %d" (bar))
As the environment was not built into the function, and used, the value is actually output as 100.
Closures don't work as they should:
As the environment was not built into the function, and used, the value is actually output as 100.