Difference between closures and lambdas?

Possible Duplicate:
What is the difference between a 'closure' and a 'lambda'?

Hello, World!

Forgive me if this is a tad of a newb q, but everyone always gets computersciencey about it..

What actually is a lambda? And what is a Closure?

As far as I understand a lambda is an anonymous function and a closure is a pointer to the variables of a lambdas parent scope.. (like a snapshot of the variables of the function it was declared in)

How correct is this?

Thanks

Daniel


That is totally correct. The term closure is describing the scope thing, the term lambda is describing the whole function as an object thing.

链接地址: http://www.djcxy.com/p/51276.html

上一篇: 什么是lambda?

下一篇: 封闭和lambda之间的区别?