Example: TWICE
Takes any number of forms and evaluates them all once and then all again.
> (defmacro twice (&rest forms)
> (append '(progn) forms forms) )
TWICE
> (twice (format t "Macros are powerful~%")
> (format t "Aren’t they?~%") )
Macros are powerful
Aren’t they?
Macros are powerful
Aren’t they?
NIL
>
Previous slide
Next slide
Back to first slide
View graphic version