When a closure "captures" a variable it "lifts" the variable out of its local scope and effectively moves it into an anonymous object.
当一个闭包“捕获”一个变量时,它就会将这个变量提取出它的本地范围,移到一个匿名对象里。
The interface to an anonymous object is published through a protocol declaration.
匿名对象的接口通过一个协议声明被发布。
The interface to an anonymous object is published through a protocol declaration.
匿名对象的接口通过一个协议声明被发布。
应用推荐