• 将一个常见的循环转化为递归函数。

    Converting a common loop to a recursive function.

    youdao

  • 您已经在Lisp中实现了递归函数。

    You've implemented a recursive function in Lisp.

    youdao

  • 可见,递归函数与循环有很多类似之处。

    As you can see, recursive functions and loops have quite a bit in common.

    youdao

  • 这将允许匿名递归函数。

    This allows for anonymous recursive functions.

    youdao

  • 此外,递归函数也增强了语言的表达能力。

    In addition, recursive functions add significant expressive power to the language.

    youdao

  • 让我们来看一些基于链表的递归函数示例。

    Let's look at a few examples of recursive functions on linked lists.

    youdao

  • 得到的样式表有太多递归函数,难以调试。

    The resulting stylesheets have many recursive functions and are difficult to debug.

    youdao

  • 但是只用递归函数来遍历树并不十分困难。

    But walking a tree just by using recursive functions is not all that difficult.

    youdao

  • 接下来,创建递归函数。

    "Next, you'll create a recursive function."

    youdao

  • 答案是递归函数。

    The answer lies in recursive functions.

    youdao

  • 实际上,可以认为循环和递归函数是能够相互转换的。

    In fact, loops and recursive functions can be considered interchangeable.

    youdao

  • 我们的下一个基于列表的递归函数示例要稍微复杂一些。

    Our next example of a recursive function on lists will be a little more complicated.

    youdao

  • 您可以开发递归函数来处理项、项中的对象、作者等等。

    You can develop recursive functions to handle entries, objects within entries, authors, and so on.

    youdao

  • 了解为什么需要堆栈的最好方法是查看递归函数的情况。

    The best way to see why stacks are needed is to look at recursive functions. For simplicity, let's look at the recursive implementation of the factorial function.

    youdao

  • 这对于所有的函数来说都是这样,而不仅仅是递归函数如此。

    This is true for all functions, not just recursive ones.

    youdao

  • 不过,对于递归函数的使用,人们所关心的一个问题是栈空间的增长。

    However, one concern people have with the use of recursive functions is the growth of stack space.

    youdao

  • 这就是递归函数是如何保证其他活动函数调用中的变量值不受影响的。

    This is how recursive functions keep from trashing the values of the variables in other, active function calls.

    youdao

  • 可能理解它的最佳途径是接触一个实际的例子,我们需要一个递归函数。

    Probably the best way to understand is with a real example and to do that, we need a recursive function.

    youdao

  • 当我们将循环转化为递归函数时,递归调用是函数所做的最后一件事情。

    When we converted our loop to a recursive function, the recursive call was the last thing that the function did.

    youdao

  • 在表1中了解循环的特性,看它们可以如何与递归函数的特性相对比。

    Take a look at the properties of loops and see how they compare with those of recursive functions in Table 1.

    youdao

  • 让我们来研究一个打印报表的常见循环,了解如何将它转化为一个递归函数。

    Let's take a look at a common loop for printing reports and see how it can convert into a recursive function.

    youdao

  • 编写这种递归函数需要执行的步骤如下所示,清单3给出了这个函数的源代码。

    The steps required to write such a recursive function are listed below, and Listing 3 presents the source code of the function itself.

    youdao

  • 递归函数有时对资源的消耗量很大,而且在用户失去耐心之前可能还没有返回结果。

    Recursive functions can sometimes be very resource hungry and may not return results before a user loses patience.

    youdao

  • 在编写递归函数时,命名let能够相当程度地减少键盘输入以及出现错误的数量。

    The named let cuts down considerably on the amount of typing and mistakes made when writing recursive functions.

    youdao

  • 而在Erlang中不需要使用循环,因为尾递归函数会被自动优化在固定的空间中运行。

    In Erlang there is no need for loops because tail recursive functions are transparently optimized to run in constant space.

    youdao

  • 语言规范可能支持goto语句和递归函数调用,但使用其他方法能够让代码更易于理解。

    Goto statements and recursive function calls may be supported by the language definition, but it is known that using other methods makes the code easier to understand.

    youdao

  • 稍后还会看到(在编写函数中)这些函数如何构成了Haskell中众多递归函数的基础。

    You'll see later (in Writing functions) how these functions form the backbone of many recursive functions in Haskell.

    youdao

  • 获得新版本后,我们将调用这个find()方法,替代前面介绍的递归函数,您也应该如此。

    We will be substituting a call to this find() method for our recursive function described previously when we get this new version, and so should you.

    youdao

  • 记住当程序进行函数调用(特别是针对递归函数)时,它必须在堆栈上存储返回地址和本地变量。

    Remember that when a program makes a function call (especially for recursive ones), it has to store its return address and local variables on the stack.

    youdao

  • 区别在于,使用递归函数极少被迫修改任何一个变量——只需要将新值作为参数传递给下一次函数调用。

    The difference is that with recursive functions, you rarely have to modify any variable — you just pass the new values as parameters to the next function call.

    youdao

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

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

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