闭包是具有闭合作用域的匿名函数。
要了解闭包,首先需要了解匿名函数。
To understand closures, one first has to understand anonymous functions.
这会创建一个匿名函数并返回此函数。
匿名函数,您的函数是什么?
Go为声明匿名函数提供了简单的语法。
Go provides a simple syntax for declaring anonymous functions.
每个块都是作为一个匿名函数体来执行的。
Each chunk is executed as the body of an anonymous function.
匿名函数的参数是两项市场数据:股票代码和价格。
The anonymous function takes two market data as arguments: a ticker symbol and a price.
它是有益的申报PHP匿名函数外循环?
Is it beneficial to declare PHP anonymous functions outside a loop?
通过用匿名函数来替换正式函数定义,您可简化代码。
By replacing formal function definitions with anonymous functions, you simplify code.
这些简单的匿名函数还执行另一个重要而微妙的任务。
Those simple anonymous functions also perform another important but subtle task.
好奇的读者会想是什么使仿函数不同于匿名函数或闭包呢?
Curious readers will be wondering what makes a functor different from an anonymous function or closure.
因为这些函数都没有名字,所以都是匿名函数。
Since these function do not have a name, they are anonymous.
上面的这个匿名函数很简单,它仅仅包装了一下broker。
This particular anonymous function is pretty simple: it wraps broker.
VisualBasic的迭代器,看上去更像一个匿名函数。
Visual Basic's Iterators, look more like an anonymous function.
例如,有一个用在匿名函数里头的ParallelFor语法。
For example, there is a Parallel For syntax that relies on anonymous functions.
这个to_function实现做了一件事——返回一个匿名函数。
This version of to_function does one thing - it returns an anonymous function.
然后将一个匿名函数(closure)传入到onevent属性。
You then pass in an anonymous function (closure) to the onEvent property.
afterFinish的值是一个匿名函数,在效果完成时被调用。
The value of afterFinish is an anonymous function that is invoked when the effect is done.
匿名函数通常通过分配到一个代理变量,来在其他函数的上下文中定义。
An anonymous function is defined within the context of another function, usually by assigning it to a delegate variable.
其优点远远不止匿名函数、正则表达式支持、模式匹配这几样。
Anonymous functions, regular expression support and pattern matching are only the beginning.
请注意将您传递到extend函数的映射从关键字映射到匿名函数。
Notice that the map you pass to the extend function maps from keywords to anonymous functions.
按照设计,闭包是匿名函数,这意味着它们不显示在反射api中。
By design, closures are anonymous functions, which means they do not appear in the reflection API.
YUI分析器提供了一种调用匿名函数的机制,使得它们可以被分析。
The YUI Profiler provides a mechanism for instrumenting anonymous functions, allowing them to be profiled.
这个表达式实际上是一个“匿名函数”的函数体,在Scala中称为字面函数。
This expression is actually the body of an "anonymous function", called a function literal in Scala.
不过对于VB用户来说,在不支持多行匿名函数的语言里,新语法看起来没那么清爽。
Unfortunately for VB users, it isn't nearly as clean in languages that don't support multi-line anonymous functions.
如果函数是匿名函数,则在function和左括号之间应有一个空格。
If a function literal is anonymous, there should be one space between the word function and the left parenthesis.
解决办法是,把你的变量放在一个匿名函数内部,定义完之后立即调用它。
The workaround is to encapsulate your variables in an anonymous function and call that function immediately after you define it.
此匿名函数现在被命名了,使大多数分析器的分析结果显示出有意义的内容。
The anonymous function is now named, providing most profilers with something meaningful to display along with the profile results.
它是一个匿名函数,times方法被传递到该函数,函数的结果是打印出静态语句。
It's an anonymous function that's passed into The Times method and prints a static sentence. This code is tighter and simpler than the alternative with a for loop, shown in Listing 2.
它构造一种抽象形式的Erlang表达式,并返回一个匿名函数,让它以后再动态地求解。
It builds an Erlang expression in abstract form and returns an anonymous function which can dynamically evaluate it later.
应用推荐