3 ms·
DEFVAR declares a variable to be special. That causes ALL uses of that variable to use dynamic binding. The function inside a LET with a dynamic variable does
by lispm 5y ago
DEFVAR declares a variable to be special. That causes ALL uses of that variable to use dynamic binding.
The function inside a LET with a dynamic variable does not create a closure. If one calls CALC-WITHOUT-GAIN later, there is no binding - unless there is another dynamic binding of that variable by a different LET active.
- mtreis86 5y agoThanks for correcting me. I know there is a way to do something similar to what I had in there, but I don't remember what it was. Any idea?