|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
mark: when people use the term closure, they usually mean lexical closure
http://en.wikipedia.org/wiki/Closure_%28computer_science%29
On Mon, Mar 15, 2010 at 6:28 PM, Michael Bevilacqua-Linn
<michael.bevilacqualinn@gmail.com> wrote:
>>It doesn't seem to me that nested procedure definitions are strictly
>> necessary
> to create a closure - so long as a function is created whose variables are
> bound
> according to the scope at the time of creation.
>
> Yeah that particular syntax was just for the sake of illustration.
> Generally, you'd have some way of creating an anonymous procedure, that you
> can then pass around as needed.
>
>>... even after that original scope is gone, e.g. if a reference was passed
>> out
> of "outerProcedure" and lives on afterward.
>
> Yep, should have mentioned that.
>
> [SNIP]
>
- References:
- closures
- From: "Mark M. Hoffman" <mhoffman@lightlink.com>
- Re: closures
- From: mjd-phillylambda@plover.com
- Re: closures
- From: Michael Bevilacqua-Linn <michael.bevilacqualinn@gmail.com>
- Re: closures
- From: "Mark M. Hoffman" <mhoffman@lightlink.com>
- Re: closures
- From: Michael Bevilacqua-Linn <michael.bevilacqualinn@gmail.com>
|
|