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

From: Jens Axel Søgaard (jensaxel at soegaard.net)
Date: Sun Oct 10 13:40:54 EDT 2010

2010/10/10 Eli Barzilay <eli at barzilay.org>:
> I like mixing definitions and expressions -- maybe the bodies of
> `cond' etc should also allow it?

In

>  (define (foo x)
>    (when (even? x) (define x (add1 x)) (printf "increment\n"))
>    x)

is the scope of the definition (define x ...) the entire body of foo ?

-- 
Jens Axel Søgaard


Posted on the dev mailing list.