Michael Bevilacqua-Linn on 15 Mar 2010 15:28:20 -0700 |
>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]
|
|