define-macro   macro


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/runtime/init.xtm

Implementation

; DEFINE-MACRO Contributed by Andy Gaynor
(macro (define-macro dform)
       (if (symbol? (cadr dform))
           `(macro ,@(cdr dform))
           (let ((form (gensym)))
             `(macro (,(caadr dform) ,form)
                     (apply (lambda ,(cdadr dform) ,@(cddr dform)) (cdr ,form))))))


Back to Index