Another Example
(let ((list '(one two three four five)))
(setq closure1 #’(lambda () (pop list)))
(setq closure2 #’(lambda () (pop list))))
;; two closures, both with a reference to LIST
(funcall closure1)
ONE
(funcall closure2)
TWO
Previous slide
Next slide
Back to first slide
View graphic version