Re:How JavaScript closures work under the hood
by PyComfy on Sunday September 06, 2015 @01:54PM
(#10178403)
A closure is a procedure that captures its free variables where those free variables are resolved in the lexical context.
A lambda procedure is just an anonymous procedure.
A lambda is not necessary a closure and a closure is not necessary a lambda.
A closure, as explained in the article, is a pair of a code pointer and an environment. It is an object "inside the machine" that exists at runtime.
A lambda expression is a syntactic entity, a piece of source code: something you can see on the screen.
A lambda expression evaluates to a closure, just as an integer literal (a string of digits) evaluates to an integer, or a 'new' expression evaluates to an instance (object).