
12 Aug
2009
12 Aug
'09
1:21 a.m.
In article <20090729202442.GA8017@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.