闭包和 lambda 之间的区别?

发布于 2024-10-06 05:03:07 字数 394 浏览 0 评论 0原文

可能的重复:
“闭包”和“闭包”之间有什么区别拉姆达'?

你好,世界!

如果这有点新手,请原谅我,但每个人总是对它有计算机科学知识。

lambda 到底是什么?什么是闭包?

据我了解,lambda 是一个匿名函数,而闭包是指向 lambda 父作用域的变量的指针..(就像声明它的函数的变量的快照)

这有多正确?

谢谢

丹尼尔

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

英雄似剑 2024-10-13 05:03:07

这是完全正确的。术语“闭包”描述了范围事物,术语“lambda”将整个函数描述为一个对象事物。

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文