• 默认情况下,它们传递的,意味着如果更新传递到闭包函数定义值,则更新外部值。

    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.

    youdao

  • 例如处理一项事务,采用闭包后,确保事务代码能由适当函数调用界定

    For example, if you have a transaction, you can make sure that your code always brackets transactional code with the appropriate function calls.

    youdao

  • 许多动态语言一样,这些函数它们定义范围内创建词法闭包

    These functions create a lexical closure on the scope in which they were defined like blocks in many dynamic languages.

    youdao

  • 本文中,继续讨论这些概念,讲解一级函数优化闭包

    In this article, I'll continue this tour of concepts by talking about first-class functions, optimizations, and closures.

    youdao

  • 如果使用过高阶函数闭包那么可能容易理解清单10中的代码

    If you've ever used closures or higher-order functions, you might have a better understanding of the code in Listing 10.

    youdao

  • 后续内容闭包高阶函数一些有趣的对比

    I'll also circle back to some interesting comparisons between closures and higher-order functions in a later installment.

    youdao

  • 这些由列表构建简单指令构成了递归高阶函数甚至闭包continuation之类高级抽象基础

    These simple list-building instructions form the foundation of recursions, higher-order functions, and even higher-order abstractions like closures and continuations.

    youdao

  • 外部环境导入变量闭包函数定义use子句中指定的。

    Variables to be imported from the outside environment are specified in the use clause of the closure function definition.

    youdao

  • 表达式闭包定义简单函数一种便捷方式用来模仿lambda符号

    Expression closures are a shorthand method of defining simple functions that mimics lambda notation.

    youdao

  • 一流的方法函数闭包

    First-class methods and functions (closures)

    youdao

  • 同样可以writeapi函数来探测对等套接字闭包

    The closure of a peer socket can also be detected with the write API function.

    youdao

  • 清单1中所Example对象成员函数定义闭包

    As we see in Listing 1, the member functions of the Example object are defined as closures.

    youdao

  • 这种情况返回函数对象就是一个闭包其中封装了一些日志代码最初函数调用需要数据

    In this case the returned function object is a closure which encapsulates some logging code and the data needed to call the original function.

    youdao

  • 闭包函数语言共有特征之一

    Closures are one of the common features of functional languages.

    youdao

  • 一个闭包这些引用所以函数调用可以安全引用这些变量即使它们已经超出函数作用域

    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!

    youdao

  • 闭包应用函数模式令人兴奋的,一旦这么做了之后它们应用面向对象设计模式,不是什么事情了

    Applying closures to functional patterns is exciting, and once you've done that, it's not too big a stretch to apply them to object-oriented design patterns.

    youdao

  • 我们机制开始,用这个机制可以表示计算模式闭包,计算模式一个来自函数编程的概念。

    We'll start with a mechanism by which you can express closures that embody a pattern of computation, which is a concept from functional programming.

    youdao

  • 以上演示了为什么闭包体现了函数思想运行时管理状态

    This illustrates why the use of closures exemplifies functional thinking: allow the runtime to manage state.

    youdao

  • 这个作用域闭包调用函数定义代码联系起来的纽带

    This closed scope is the communication that ties the closure to the calling function and the code that defines it.

    youdao

  • 我们闭包获取颜色名字传递构造函数存储到对象中。

    We also grab the color and name of the dog, passed in the constructor and stored in the object, within the closure.

    youdao

  • 好奇读者是什么使仿函数不同匿名函数闭包呢?

    Curious readers will be wondering what makes a functor different from an anonymous function or closure.

    youdao

  • 闭包本质函数和其引用变量统一定义。

    Closures are functions that reference variables from the scope enclosing the function definition.

    youdao

  • 内部函数获得使用外部函数变量时,称其一个闭包

    When an inner function gains and USES access to its outer function's variables it is known as a closure.

    youdao

  • 这种情况下使用与在外部使用闭包实现目的相同范围内绑定的特定函数

    Using closures serves the same purpose in this situation as it would outside of a class: to contain a specific function to be bound within a small scope.

    youdao

  • 闭包具有作用域匿名函数

    Closures are anonymous functions with closed scope.

    youdao

  • 正如我们反射API能够通过现有函数方法动态创建,从而闭包提供强大的支持

    The reflection API has great support for closures, as we've now seen, in the form of being able to create them from existing functions and methods dynamically.

    youdao

  • 上下文中用作通过闭包调用函数方法定义上下文中执行函数调用

    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.

    youdao

  • 如果碰巧闭包函数某个事件绑定,那么必须绑定。

    If you happened to attach the closure to an event, then you would have to detach it from that event.

    youdao

  • 闭包函数lambda函数绝对不是出现概念它们来自函数编程领域

    The concepts of closures and lambda functions are definitely not new ones; they both come from the functional programming world.

    youdao

  • 闭包函数lambda函数绝对不是出现概念它们来自函数编程领域

    The concepts of closures and lambda functions are definitely not new ones; they both come from the functional programming world.

    youdao

$firstVoiceSent
- 来自原声例句
小调查
请问您想要如何调整此模块?

感谢您的反馈,我们会尽快进行适当修改!
进来说说原因吧 确定
小调查
请问您想要如何调整此模块?

感谢您的反馈,我们会尽快进行适当修改!
进来说说原因吧 确定