[Haskell-beginners] Re: Closure
Daniel Bastos
dbastos+0 at toledo.com
Wed Aug 12 01:21:24 EDT 2009
In article <20090729202442.GA8017 at seas.upenn.edu>,
Brent Yorgey wrote:
> With that said, on some level the idea of a closure is really just an
> implementation detail---I wouldn't say that understanding it is of
> fundamental importance in learning Haskell. But learning things never
> hurts (except when it does).
So it sounds correct to say that a closure is a function that brings
an environment with it, such as variables defined outside of it.
With this ability, we can construct functions on the fly because a
function can return a closure which is amended and, say, returned
again another closure more fully specified.
More information about the Beginners
mailing list