Macro Examples
Macros are just fns that transform expressions
Use macro-expand-1 to see defn
> (defmacro nil! (x)
(list 'setf x nil))
NIL!
(setq x 5)
5
> (nil! x)
NIL
> x
NIL
> (macroexpand-1 '(nil! x))
(SETF X NIL)
Previous slide
Next slide
Back to first slide
View graphic version