[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
lexical closure bug?
- To: info-mcl@cambridge.apple.com
- Subject: lexical closure bug?
- From: Robert Bruce Findler <robby+@CMU.EDU>
- Date: Wed, 20 Oct 1993 15:29:04 -0400 (EDT)
- Cc:
(let ((*fun* nil))
(do ((a (list 'a 'b 'c 'd 'e) (cdr a)))
((endp a))
(push #'(lambda () (format t "~a~%" a)) *fun*))
(mapcar #'funcall *fun*))
I think that this should print out something like:
(a b c d e)
(b c d e)
(c d e)
(d e)
(e)
Instead, it prints:
nil
nil
nil
nil
nil
Am I missing something here?
__________________________________________________________________________
Robby Findler robby+@cmu.edu
Carnegie Mellon University Pittsburgh, PA (412) 681-4552