On Nov 22, 2:45 am, Mario Fusco <[email protected]> wrote:
> Could you please better explain why the variable first of the AdderOf
> class in my example cannot be considered a variable captured from the
> lexically enclosing scope? I am sure that I am missing something but I
> don't understand what.

The hallmark of a closure is that it can contain an identifier that is
bound to a name in a lexically enclosing scope.

The name "first" does not appear in the "closure", and "first" is not
a variable that is defined in a scope that lexically encloses the
"closure".

--

You received this message because you are subscribed to the Google Groups "The 
Java Posse" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/javaposse?hl=.


Reply via email to