3 ms·
No, the anonymous functions do capture the current context. See here: http://cobra-language.com/trac/cobra/browser/cobra/trunk/Tests/320-misc-two/820-anonymous-
by bad_user 18y ago
No, the anonymous functions do capture the current context. See here: http://cobra-language.com/trac/cobra/browser/cobra/trunk/Tests/320-misc-two/820-anonymous-methods-aka-closures/100-anonymous-methods.cobra?rev=1998 http://cobra-language.com/trac/cobra/browser/cobra/trunk/Tes...
Search for the test that increments the "count" variable.
I don't really like the syntax for these anonymous methods. Boo is more readable in this regard: http://boo.codehaus.org/Closures http://boo.codehaus.org/Closures