26 Fév
2009
26 Fév
'09
16:27
(define-macro (define-cool-macro decl . body) `(begin (define-macro ,decl ,@body) (define-macro ,(cons (string->symbol (string-append (symbol->string (car decl)) "-dbg")) (cdr decl)) ,@body))) (define-cool-macro (fn . body) `(lambda ,@body)) (pp (fn-dbg (x) (+ x 2))) Now, does anyone see anything wrong with define-cool-macro, or some way/something that may resulted in unexpected sideeffects (along the lines of accidently introducing variables in macros). Thanks!