[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: isn't computation-rules redundant?

This page is part of the web mail archives of SRFI 53 from before July 7th, 2015. The new archives for SRFI 53 contain all messages, not just those from before July 7th, 2015.

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))