2011/3/21 Patrick Li <[email protected]>:
> [...]
> 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.
> [...]

Hello Patrick,

in that case I'm afraid you have to use some sort of helper macro or
recursive definition, given the current implementation of syntax-rules
in CHICKEN. Try something like this:

(define-syntax temp
  (syntax-rules ()
    [(temp (arg ...) command)
     (command arg ... some-more-args)]
    [(temp args command ...)
     (do (temp args command) ...)]))

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