I'm trying to write a macro that translates a list into a procedure.
Here's a very simplified version of my code:
(define spec '(foo))
(define (process-spec spec)
(if (pair? spec)
'(lambda x x)
(error "oops")))
(define-macro (spec->proc a-spec)
(process-spec a-spec))
#> ((spec->proc (foo)) 33)
(33)
#> (spec->proc spec)
Error: during expansion of (spec->proc ...) - oops
Is there any way to evaluate a-spec at macroexpansion time, or a
clever workaround to avoid the problem, without putting the
specification itself in the call to spec->proc?
Reed Sheridan
_______________________________________________
Chicken-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/chicken-users