- 論壇徽章:
- 0
|
原帖由 MMMIX 于 2009-1-4 11:49 發(fā)表 ![]()
closure 在 Perl 中被用來(lái)實(shí)現(xiàn)函數(shù)模板,在 Lisp 中應(yīng)該也可以起類(lèi)似的作用。
perl 的 closure 具體指的是什么?這個(gè)詞我好像總是消化不了。在 SICP 中,對(duì) 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 跟這個(gè)是一致的嗎?
[ 本帖最后由 win_hate 于 2009-1-4 12:11 編輯 ] |
|