This month, the Senate began consideration of a bill that would block the closure of the controversial facility as will as civilian trials for its detainees.
本月,参议院开始考虑一份议案,这份议案不仅可能阻止关闭备受争议的关塔那摩监狱,而且也会阻止关押民事案件中的囚犯。
Think of a closure as a code block that you can use as an argument, with special scoping rules.
闭包可被视作一个遵循特别作用域规则且可以用作参数的代码块。
This code can refer to local variables defined within the block, arguments to the closure, or variables from the scope in which the closure is created.
这段代码可以引用块中定义的局部变量、闭包的参数以及创建闭包的作用域中的变量。
If the request block is requesting HTML, it executes the first closure; if it's requesting XML, it executes the second.
如果发出请求的代码块是在请求HTML,这段代码会执行第一个闭包;如果发出请求的代码块在请求XML,这段代码会执行第二个闭包。
In Listing 7, we've taken things one step further by currying the map closure, resulting in a block that will multiply all the elements of a given list by 12.
在清单7中,我们把事情又向前进行了一步,对map闭包进行了curry处理,形成一个块,会将指定列表中的所有元素都乘以12。
Doesn't the newer closure syntax remind you of the Nice language's block syntax?
新的闭包语法有没有让您想起Nice语言的块语法呢?
The code between brackets is called a closure, or code block.
括号中的代码叫做闭包或代码块。
Because of the scoping rules for closures, one cannot use a goto to enter a block of code containing a closure.
因为闭包的范围规则,开发时不能使用goto语句进入包含闭包的代码块。
The code in braces is a closure and is simply a block of code that's passed to callcc.
花括号中的代码是一个闭包,它仅仅是传递给 callcc的代码块。
Notice how the mail object defined in the catch block takes a closure that defines the from, to, and message attributes.
注意catch块中定义的mail对象如何接受定义了from、to和message属性的闭包。
Notice how the mail object defined in the catch block takes a closure that defines the from, to, and message attributes.
注意catch块中定义的mail对象如何接受定义了from、to和message属性的闭包。
应用推荐