[plt-scheme] sytnax macro question
I wrote:
> From The Scheme Programming Language page 168: http://www.scheme.com/tspl2d/
>
> (syntax-case exp (literal ...) clause ...) syntax
>
> Each /literal/ must be an identifier. Each /clause/ must take one of the
> following two forms:
>
> (pattern output-expression)
> (pattern fender output-expression)
I thought that it would be straight-forward to define a variation on
syntax-case that didn't use fenders and allowed for multiple
output-expressions, ie /clause/ is of the form (pattern output-expression
...), but I can't seem to make it happen... Here is my naïve implementation:
(define-syntax my-syntax-case
(syntax-rules ()
((_ exp (literal ...) (pattern output-expression ...) ...)
(syntax-case exp (literal ...)
(pattern (let () output-expression ...)) ...))))
Could someone help me out? TIA.
-d