[racket] Racket v5.0.2
About a minute ago, Mark Engelberg wrote:
> On Sat, Nov 6, 2010 at 10:22 PM, Eli Barzilay <eli at barzilay.org> wrote:
> > * The `when', `unless', `cond', `case', and `match' forms (in
> > `racket/base' and derived languages) now allow immediate
> > internal definitions.
>
> Can you point me to some examples of this? I can't find any in the
> documentation.
Here's an example.
> (let ([x 1])
(when (< x 10) (define x "small") (printf "~a\n" x))
(* x 100))
small
100
The documentation for them doesn't have examples. I'd add some, but
this probably warrants some more editing than that.
--
((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay:
http://barzilay.org/ Maze is Life!