[racket-dev] `cond' / `when' / `unless' / etc bodies

From: Eli Barzilay (eli at barzilay.org)
Date: Sun Oct 10 12:43:46 EDT 2010

I like mixing definitions and expressions -- maybe the bodies of
`cond' etc should also allow it?

The only downside I see is the possible confusion in somthing like

  (define (foo x)
    (when (even? x) (define x (add1 x)) (printf "increment\n"))
  ;; why isn't this working?

but that seems like a minor point (without that `printf' you'd still
get a syntax error; and the same confusion can already happen with
`let' etc).

          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!

Posted on the dev mailing list.