[racket] help with syntax-splicing in small macro

From: Danny Yoo (dyoo at hashcollision.org)
Date: Thu Sep 20 15:14:51 EDT 2012

> Thanks for the help. The domain was about trying to get the output of a
> csv into
> a struct. I had already solved (badly) the problem with
>
> (define-syntax list->tst
>   (syntax-rules ()
>     [(_ attr-list) (apply tst (syntax->datum #`(#, at attr-list)))]))
>
> But solving it directly through the template is much better.


Hi Eduardo,


But do you even need macros for the problem?  Could a plain vanilla
function work as well?  I just want to make sure I understand why we're in
macro-land in the first place.


Good luck!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20120920/55ca1b4a/attachment.html>

Posted on the users mailing list.