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:
(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
<address@hidden> wrote:
2011/3/21 Patrick Li <address@hidden>:
> [...]
> 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.