- 论坛徽章:
- 0
|
原帖由 MMMIX 于 2009-1-4 11:49 发表 ![]()
closure 在 Perl 中被用来实现函数模板,在 Lisp 中应该也可以起类似的作用。
perl 的 closure 具体指的是什么?这个词我好像总是消化不了。在 SICP 中,对 closure 描述为
In general, an operation for combining data objects satisfies the closure property if the results of combining things with that operation can themselves be combined using the same operation.
Closure is the key to power in any means of combination because it permits us to create hierarchical structures -- structures made up of parts, which themselves are made up of parts, and so on.
perl 的 closure 跟这个是一致的吗?
[ 本帖最后由 win_hate 于 2009-1-4 12:11 编辑 ] |
|