It ACTS like a macro in this context, where calling the method of function via the closure makes the function call in the context of where it's defined.
它在此上下文中用作宏,通过闭包调用函数方法将在定义它的上下文中执行函数调用。
However, we can set up a closure at the beginning of the function to keep the string from having to be passed on each call.
不过,我们可以在函数的起始处设置一个闭包(closure),以使得不再必须为每一个调用都传递那个字符串。
Variables to be imported from the outside environment are specified in the use clause of the closure function definition.
从外部环境中导入的变量是在闭包函数定义的use子句中指定的。
The closure of a peer socket can also be detected with the write API function.
同样,可以用writeapi函数来探测对等套接字的闭包。
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函数式编程》的“字面函数和闭包”章节中被讨论。
That is, a closure is an anonymous function that, when created, attaches to itself the value of variables from the scope of the code that created the function.
就是说,closure是个匿名函数,在其创建时,将来自创建该函数的代码范围内得变量值附加到它本身。
A closure "closes around" these references, so the function invocation can safely refer to the variables even when the variables have gone out of scope!
一个闭包封闭了这些引用,所以函数调用可以安全的引用这些变量,即使它们已经超出了函数的作用域。
When you use a closure, remember that the call object of the enclosing function, including all function arguments and local variables, will last as long as the closure does.
当你使用闭包时,记得包含函数的调用对象,包括所有的函数参数和本地变量,会有跟闭包一样的存活时期。
The technology of landfill closure was discussed, with analysis of the unit components and function of landfill closure system. The measures of engineering quality control were proposed as well.
探讨了垃圾填埋场封场工程中的封场覆盖技术,分析了封场覆盖系统各组成部分的结构组成和功能,提出了封场覆盖系统的工程质量控制措施。
Loss of DST function increases stomatal closure and reduces stomatal density, consequently resulting in enhanced drought and salt tolerance in rice.
DST功能丧失之后会使气孔关闭增加和气孔密度减小,从而提高水稻的耐旱性和耐盐性。
Larger defects appear to require longer wound closure times, and may prolong the duration of impaired disc function.
而大的纤维环缺陷需要较长的闭合时间,可能延长椎间盘功能受损的时间。
The changes in plasma BNP level in patients with congenital heart disease after transcatheter closure would contribute to evaluate the recovery of right ventricular function.
结论先天性心脏病行封堵术后,观察患者血浆BNP水平变化有助于评估右心室功能的恢复情况。
Objective To observe the shape and function changes of right atrium (ra) and right ventricle (rv) after closure ASD in transcatheter.
目的观察房间隔缺损(asd)经右心导管行封堵术后,右心房(RA)、右心室(RV)形态及功能的变化。
Closure of the ASD can still remodel the right atrium and ventricular, decrease the pulmonary artery pressure, and improve the cardiac function in the elderly patients.
结论:高龄本身并非老年房间隔缺损手术禁忌,老年患者通过封堵器或手术闭合房缺仍可以重构右心房、右心室,降低肺动脉压,显著改善心功能。
Closure of the ASD can still remodel the right atrium and ventricular, decrease the pulmonary artery pressure, and improve the cardiac function in the elderly patients.
结论:高龄本身并非老年房间隔缺损手术禁忌,老年患者通过封堵器或手术闭合房缺仍可以重构右心房、右心室,降低肺动脉压,显著改善心功能。
应用推荐