Consider a toy macro defined as:

(define-syntax mysyn
    (syntax-rules(fun)
      [(mysyn element ...)
       (begin
         #`(define fun
             (display element)...))]))

and a list:
(define l '(1 2 3))

Is there a way to call the macro like so: (mysyn l). When I try this, the 
syntax object created looks like: '(define fun (display l)). 
What I want it to look like is:

'(define fun 
   (display 1)
   (display 2)
   (display 3))


In other words, my question is whether/how I can pass the entire list to the 
macro and let the macro be expanded on each element of it.

-- 
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to