[plt-scheme] Re: match-lambda question

From: harsha (harsha.v.r at gmail.com)
Date: Sun Mar 23 01:04:48 EDT 2008

thanks for the reply,
this seems to be an elegant soln,
but since it uses the expression (macro x), it requires that the
existing macros be redefined to take all their inputs as a single

changing the above code to
(define-syntax (mp mac) ;macro->procedure
    (syntax-case mac ()
      ((_ x) (syntax (λ args
                            (eval `(x . ,args))))))
seems to work ok, though the eval worries me,

maybe, it isn't possible to change a general macro to a function as
the arguments to the fn are not available during expansion time.
it might still be possible to define macro which allows pattern-
matching with ...'s within a match-lambda body,

Posted on the users mailing list.