[plt-scheme] Macro ellipsis question
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>