That's true, but if you used that as the definition of "closure", then every subroutine that is in a lexical environment is a closure. That makes the term practically useless.
I think it's more useful to consider a closure to be a subroutine that closes around its lexical environment, and uses it to maintain state between invocations. It may not be as technically accurate, but it captures the meaning I think is most common, and definitely more useful.
In reply to Re^4: Functional Programming & method rewriting
by revdiablo
in thread Functional Programming & method rewriting
by SpanishInquisition
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |