[CM] defvar global list

Bill Schottstaedt bil at ccrma.Stanford.EDU
Fri Dec 26 12:37:54 PST 2014

I think the variable used by collect in loop is local to
the loop (it is handled like "with" according to cltl2),
so the *test* global is not touched.  In the second 
example, you're using the value returned by the
function (i.e. the first loop), which is the value of local
variable *test* -- once again the global *test* is
ignored, but it is irrelevant in the second case.
You could (setf *test* ...loop...) to change the
global *test*'s value.

More information about the Cmdist mailing list