The suggested closures came under assault from all parties.
关闭机构的建议受到各方严厉批评。
What's so special about closures?
闭包有什么特别之处?
您说的是闭包吗?
But further closures will be hard to avoid.
但更多的工厂倒闭将难以避免。
I'll use Ruby to show how closures work.
我将使用Ruby来展示闭包的运行原理。
Do you have this kind of closures?
你有这种瓶盖吗?
My next step is to define the two closures.
下一步是定义两个闭包。
You should be able to access all of the closures.
应当能够访问所有的闭包。
So far so good, for code written without closures.
对于没用闭包写成的代码来说,到现在为止还算不错。
With closures, you can also refactor from the outside in.
有了闭包,您也可以从外到里进行重构。
Ruby also lets you write methods that use your own closures.
Ruby让您也可以编写使用自己的闭包的方法。
Don't use closures unless you really need closure semantics.
不要使用闭包,除非你真正需要它。
Note that you can use closures and reference variables later too.
注意,稍后您也可以使用闭包和引用变量。
To understand, you need to know about closures and the ExpandoMetaClass.
要理解这一点,需要了解closures和ExpandoMetaClass。
To begin, add some simple text to the closures, as shown in Listing 9.
首先,向闭包添加一些简单文本,如清单9所示。
Before we wrap up, let's look at one additional use of Groovy closures.
在结束之前,我们来看一下Groovy闭包的一个附加用途。
To understand closures, one first has to understand anonymous functions.
要了解闭包,首先需要了解匿名函数。
Many of the closures were plants with daily capacity below 1,000 tonnes.
很多停产工厂的日加工能力都在1,000吨以下。
Both companies' plans are expected to include a number of plant closures.
预计两家公司的计划都将包括大批工厂的关闭。
"There is a certain supply shortage as a result of the closures," he said.
“由于这些关厂措施,目前有一定程度的供应短缺,”他表示。
This is where closures step in and take the lambda functions to the next level.
因此出现了闭包并使lambda函数得到增强。
We can also have functions that directly return closures, as we see in Listing 6.
我们也可以拥有直接返回闭包的函数,如清单 6 所示。
The most immediate factor is an unusually high number of closures for maintenance.
这一切要归因于诸多因素,其中最直接的原因是今年停产整修的企业异常之多。
I'll start with the same example this time, but enhance it considerably with closures.
这次,我还用相同的示例开始,但是用闭包对它进行了极大的增强。
Their most basic anxiety is that foreign ownership will mean factory closures and job losses.
他们最基本的担忧就是外国所有将意味着工厂关闭和工作岗位丧失。
You step into Closures rather than over them.
你应单步进入(step into)闭包而不是越过(step over)它们。
Closures have another huge advantage: they make it easy to enforce policy.
闭包还有一项重大的优势:让实施策略变得容易。
Closures are a very powerful language feature but can take some getting used to.
闭包是一个非常强大的语言功能,但可能需要一些时间来适应。
Closures are a very powerful language feature but can take some getting used to.
闭包是一个非常强大的语言功能,但可能需要一些时间来适应。
应用推荐