Hi guys, 
I’m stumped.  In a nutshell I want to write a macro that is passed  an id and 
will produce a macro called id that can take variable arguments. I’m sure I’m 
overlooking something fundamental. The basic form below “works” if I don’t have 
ellipsis aver the variables, but that’s not what I’m after. Here’s an example 
that is obviously wrong, but is along the lines of what I’m looking for:

#lang racket


(require (for-syntax syntax/parse
                     racket/syntax))

(define-syntax (make-id-macro stx)
  (syntax-parse stx
    [(_ id)
     (with-syntax ([name (format-id #'id "do-~a" #'id)])
       #'(define-syntax (name stx)
           (syntax-parse stx
             [(_ parms ...)
              #'( list parms ...)])))]))

Any help in this and explaining why it fails would be greatly appreciated.

-Kevin

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/beaa2ef6-afd2-4686-829a-390eb69f5620n%40googlegroups.com.

Beyond the Racket Users Google Group, Racket Discussions take place on 
Discourse ( https://racket.discourse.group/ ) and Discord ( 
https://discord.gg/6Zq8sH5 ). Discussion (but less active) also takes place on 
the Racket Slack https://racket.slack.com/ ( sign up at 
https://racket-slack.herokuapp.com/ ), and IRC #racket 
https://kiwiirc.com/nextclient/irc.libera.chat/#racket
--- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/6BC84910-3AC4-4729-8BAA-D1488E84A54B%40gmail.com.

Reply via email to