[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

scoping...



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.