Re: isn't computation-rules redundant? Alex Shinn 26 Mar 2004 05:22 UTC

At Fri, 26 Mar 2004 10:26:51 +0900, alex wrote:
> [...] The following is easier to read and to teach
>
>   (define-syntax-computations and ()
>     () #f
>     (x) x
>     (x y z ...) (if x (and y z ...) #f))

... and both versions are easier to read if you actually include the
"and" in the LHS, sorry about that:

   (define-syntax-computations and ()
     (and) #f
     (and x) x
     (and x y z ...) (if x (and y z ...) #f))

The abbreviation could work but I think the longer version reads better.
Also the following indentation style works in this case, but in general
won't look so pretty for complex macros:

   (define-syntax-computations and ()
     (and)            #f
     (and x)          x
     (and x y z ...)  (if x (and y z ...) #f))

--
Alex