Variable Capture
How would you implement Lisp’s OR macro?
(defmacro or2 (a b)
`(let ((temp ,a))
(if temp temp ,b)))
(let ((x nil)
(temp 7))
(or2 x temp))
;; Returns NIL (there are two TEMPs)
Previous slide
Next slide
Back to first slide
View graphic version