On Wed, 13 Nov 2013 22:26:33 -0500
Greg Hendershott
<greghendersh...@gmail.com> wrote:

> > local is a teaching construct that ensures that the semantics of
> > locally defined functions is 100% in sync with 'globally' defined
> > functions. An experienced programmer may ignore local completely.
> 
> I remember that when I was first learning Racket, `local` was a red
> herring for me. It was in the docs so I felt it was something more I
> needed to learn, but struggled for awhile to figure out what it
> brought to the party.
> 
> Maybe it's already less prominent in the docs these days (it was long
> enough ago that I don't remember the prominence back then). The only
> thing I could really find now was:
> http://docs.racket-lang.org/reference/local.html
> 
> I wonder if something like what you wrote above, could be added there?
> "Note: This is a teaching construct you won't use as an experienced
> Racket programmer."
> 
> (Not to make a mountain out of a molehill. Just want to share my
> learning experience, while I still can remember it.)
> ____________________
>   Racket Users list:
>   http://lists.racket-lang.org/users
> 

Thanks to both of you for the explanation. 

It seems that using define inside a function is a specialty of Racket
as in other schemes I would need to use let, let* or letrec
appropriately when defining something inside a function.


-- 
Manfred





____________________
  Racket Users list:
  http://lists.racket-lang.org/users

Reply via email to