Hi Thomas,

Your solution does in fact do what I was asking for. The example I gave was
just a simplified version of what I want to do. Sorry for being unclear. The
following is closer to what I actually need to accomplish:

transform:
(temp (a b c) do-this do-that do-other)

to:
(do (do-this a b c some-more-args)
    (do-that a b c some-more-args)
    (do-other a b c some-more-args))

The dot trick doesn't work in this circumstance.
  -Patrick

On Sun, Mar 20, 2011 at 10:36 PM, Thomas Chust <[email protected]> wrote:

> 2011/3/21 Patrick Li <[email protected]>:
> > [...]
> > I'm trying to write a macro that will tranform:
> > (temp (a b c) do-this do-that do-other)
> > into this:
> > (do (do-this a b c)
> >     (do-that a b c)
> >     (do-other a b c))
> > [...]
>
> Try this:
>
> (define-syntax temp
>  (syntax-rules ()
>     [(temp args command ...)
>     (do (command . args) ...)]))
>
> Ciao,
> Thomas
>
>
> --
> When C++ is your hammer, every problem looks like your thumb.
>
_______________________________________________
Chicken-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to