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子句中指定的。
应用推荐