[plt-scheme] Macro ellipsis question

From: James Coglan (jcoglan at googlemail.com)
Date: Tue Jan 27 08:06:52 EST 2009

Hi all,

I've a quick question about macros. I'm doing my own Scheme implementation
and trying to figure out macros from R5RS and PLT docs. My question is: is
the following a valid macro, assuming you provide equal numbers of symbols
and values?

(define-syntax parallel-set!
  (syntax-rules ()
    [(parallel-set! (symbol ...) (value ...))
      (set! symbol value) ...]))

(parallel-set! (a b c) (1 2 3))
; a = 1, b = 2, c = 3

I've implemented ellipses and subpatterns but am not sure on some of the
details when using both together. Any information gratefully received.

-- 
James Coglan
http://github.com/jcoglan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20090127/be30ce59/attachment.html>

Posted on the users mailing list.