这种情况下返回的函数对象就是一个闭包,其中封装了一些日志代码和最初的函数调用所需要的数据。
In this case the returned function object is a closure which encapsulates some logging code and the data needed to call the original function.
默认情况下,它们是由值传递的,意味着如果要更新传递到闭包函数定义内的值,则不更新外部值。
By default, they are passed by value, meaning that if we would update the value passed within the closure function definition, it would not update the outside value.
真正重要的是一下部分,迭代器和闭包一两下就显示出了它们的威力。
The real knockout is the next part, where the one-two punches of iterators and closures shows their power.
应用推荐