[racket] macro pattern problem
Hello all,
I want to quote every even and evaluate every odd variable of the input
and assemble everything in a list.
So I wrote the following macro to do it:
(define-syntax quote-even
(syntax-rules ()
[(quote-even att val ...)
(list 'att val ...)]))
But in the resulting list, only the very first attribute is quoted:
(syntax->datum
(expand-once
'(quote-even a 10 b 20 c 30)))
> (list 'a 10 b 20 c 30)
(quote-even a 10 b 20 c 30)
> b: undefined;
Is there a way to do do it?
Cheers,
Peter Samarin