A few seconds ago, Jens Axel Søgaard wrote:
> 2010/10/10 Eli Barzilay <e...@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 ?

No, I meant that that wouldn't work.  I'm basically suggesting a
simple change -- just wrapping the bodies of these forms in a
(let () [...]).

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!
_________________________________________________
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

Reply via email to