On Nov 9, 3:02 pm, "leppie" <[EMAIL PROTECTED]> wrote:
> Here is one Will Clinger (I think) posted a while back on comp.lang.scheme:
>
> (define-syntax define-macro
>    (lambda (x)
>      (syntax-case x ()
>        [(_ (name . params) body1 body2 ...)
>         #'(define-macro name (lambda params body1 body2 ...))]
>        [(_ name expander)
>         #'(define-syntax name
>             (lambda (y)
>               (syntax-case y ()
>                 ((k . args)
>                  (let ((lst (syntax->datum #'args)))
>                    (datum->syntax #'k (apply expander lst)))))))]
>         )))
>
> Definitely easier to understand  :)

So, with my notation, the following two are equivalent:

(datum->syntax #'kwd (apply ?func (syntax->datum (syntax rest))))
(datum->syntax #'kwd (apply ?func (cdr (syntax->datum x))))

one more piece to the puzzle...

Reply via email to