Closures
;;;Where is the closure?
(defun add1 (list)
(mapcar #’(lambda (n) (+ n 1)) list))
(defun sum (list)
(let ((sum 0))
(mapcar #’(lambda (n)
(setq sum (+ sum n)))
list)
sum))
Previous slide
Back to first slide
View graphic version