Macro Examples
Macros are just functions that transform expressions
Use macroexpand-1 to see definition
> (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