That's the definition of a closure. I'm not sure if "lambda" is necessarily synonymous with "closure" or just synonymous with "anonymous function", but lambdas are closures in many languages.
Re:Lambdas in C
by StrawberryFrog on Sunday July 03, 2011 @10:39AM
(#2723755)
You're right, my terms are sloppy. Are there rigorous definitions, or does it vary between languages?.
I think of "lambda" as a language construct that creates closures. "anonymous functions" are of course just a simpler subset of closures.
So this probably isn't really a lambda.