"Next, you'll create a recursive function."
接下来,创建递归函数。
You've implemented a recursive function in Lisp.
您已经在Lisp中实现了递归函数。
Converting a common loop to a recursive function.
将一个常见的循环转化为递归函数。
Our next example of a recursive function on lists will be a little more complicated.
我们的下一个基于列表的递归函数示例要稍微复杂一些。
Probably the best way to understand is with a real example and to do that, we need a recursive function.
可能理解它的最佳途径是接触一个实际的例子,我们需要一个递归函数。
Otherwise, a recursive function is used to calculate the factorial.
否则,使用递归函数计算阶乘。
Let's take a look at a common loop for printing reports and see how it can convert into a recursive function.
让我们来研究一个打印报表的常见循环,了解如何将它转化为一个递归函数。
This can be especially useful when you are debugging a recursive function, a function that calls itself.
在调试递归函数(调用自身的函数)时,这个功能尤其有用。
When we converted our loop to a recursive function, the recursive call was the last thing that the function did.
当我们将循环转化为递归函数时,递归调用是函数所做的最后一件事情。
In this program, all state changes are brought about by re-running the recursive function with completely self-consistent data.
在这个程序中,所有状态改变都是通过使用完全前后一致的数据重新运行递归程序而实现的。
The steps required to write such a recursive function are listed below, and Listing 3 presents the source code of the function itself.
编写这种递归函数需要执行的步骤如下所示,清单3给出了这个函数的源代码。
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.
获得新版本后,我们将调用这个find()方法,替代前面介绍的递归函数,您也应该如此。
This recursive function works fine, but it has one main shortcoming -- every iteration of the recursion will be passing the same value for the-string.
这个递归函数能很好地工作,不过它有一个主要的缺点 ——递归的每一次迭代都要为 the-string传递相同的值。
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.
语言规范可能支持goto语句和递归函数调用,但使用其他方法能够让代码更易于理解。
Walk through these dependencies by writing a recursive function that can find the latest version of a plug-in (in case duplicate plug-ins are in the same system) and all its dependencies.
我们可以编写一个递归函数来遍历这些依赖性,它可以查找某个插件的最新版本(针对在相同的系统中有重复插件的情况)以及它的所有依赖性。
We put forward a recursive function of edge adaptability, and construct an edge recombination procedure, which is easy to implement. It is a new exploration to solution method of TSP.
本文给出了边适应性函数的数学模型,并且构造了一种易于实现的路径重组算法。
Examples are given for solving complex problem by transferring variables in recursive function program, and the recursive function programs show excellent capability for solving non-numeral problem.
给出了递归函数调用时利用变量传递解决复杂问题的实例,展示了递归算法在解决非数值运算问题中的独特解题方式和效果。
It takes XML data as input, and it converts the XML string into a SimpleXMLElement object, which is sent as input to another (recursive) function in this class.
它接收XML数据作为输入,将xml字符串转化成SimpleXMLElement对象,然后发送给该类的另一个(递归)函数作为输入。
It takes XML data as input, and it converts the XML string into a SimpleXMLElement object, which is sent as input to another (recursive) function in this class.
它接收XML数据作为输入,将xml字符串转化成SimpleXMLElement对象,然后发送给该类的另一个(递归)函数作为输入。
应用推荐