[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] Help with writing a macro
From: |
Thomas Chust |
Subject: |
Re: [Chicken-users] Help with writing a macro |
Date: |
Mon, 21 Mar 2011 03:36:16 +0100 |
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.