Hi everyone,
I want to create a macro to get fields of an object specified by a list of symbols. Like
(get-fields '(x y) obj) -> (list (get-field x obj) (get-field y obj))
Now, my macro will receive (quote x) and (quote y), for example. What I want to know
is, what is the right way to unquote it? Using eval as in
(datum->syntax #'lex `(get-field ,(eval (second (syntax->datum #'(get-fields 'y xx)))) xx) #'srcloc)
removes the quote but I don't think it's the right way to do it.
Thanks,
André
I want to create a macro to get fields of an object specified by a list of symbols. Like
(get-fields '(x y) obj) -> (list (get-field x obj) (get-field y obj))
Now, my macro will receive (quote x) and (quote y), for example. What I want to know
is, what is the right way to unquote it? Using eval as in
(datum->syntax #'lex `(get-field ,(eval (second (syntax->datum #'(get-fields 'y xx)))) xx) #'srcloc)
removes the quote but I don't think it's the right way to do it.
Thanks,
André
____________________ Racket Users list: http://lists.racket-lang.org/users