Closures are function literals - expressions that embody a deferred computation that can be treated as a value and invoked later.
闭包是函数字面量(unction literal)——是包含了一个递延计算的表达式,该计算可被当成值对待,在晚些时候再调用。
You can also use this short-hand syntax in some more complex function literals, as we will see in Chapter 3, Rounding Out the Essentials.
你可以在一些更复杂的字面函数中使用这种简化的语法,就像我们将在《第3章 -要点详解》中看到的那样。
Function literals and the related concept of a closure are discussed in the section called "Function literals and Closures" in Chapter 8, Functional Programming in Scala.
字面函数和闭包相关的概念会在《第8章-scala函数式编程》的“字面函数和闭包”章节中被讨论。
Function literals and the related concept of a closure are discussed in the section called "Function literals and Closures" in Chapter 8, Functional Programming in Scala.
字面函数和闭包相关的概念会在《第8章-scala函数式编程》的“字面函数和闭包”章节中被讨论。
应用推荐