[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
scoping...
- Subject: scoping...
- From: Michael Travers <mt@media.mit.edu>
- Date: Tue, 29 Jun 93 17:54:21 -0400
If you wrap an additional let around your lambda expression, you will
fix the bug:
(let ((activity activity))
#'(lambda ()
(print activity)))
Basically, a closure saves bindings, not values. In your original
code, the let was outside the loop, so each closure points to the same
binding. If you do a let inside the loop, the right thing will
happen. This is explained in more detail somewhere in CLtL.