"Next, you'll create a recursive function."
接下来,创建递归函数。
How can I serialise a recursive function?
我怎么能连续的递归函数?
How to write a recursive function for this?
如何编写一个递归函数吗?
You've implemented a recursive function in Lisp.
您已经在Lisp中实现了递归函数。
Converting a common loop to a recursive function.
将一个常见的循环转化为递归函数。
So recursive function will not get the right results.
使递归函数不能得到正确的结果。
Otherwise, a recursive function is used to calculate the factorial.
否则,使用递归函数计算阶乘。
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.
可能理解它的最佳途径是接触一个实际的例子,我们需要一个递归函数。
Main is a recursive function — it accepts a node set in the current argument and loops over the node set.
main是一个递归函数,它用current参数接受一个节点集并遍历该节点集。
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.
在调试递归函数(调用自身的函数)时,这个功能尤其有用。
This is how recursive functions keep from trashing the values of the variables in other, active function calls.
这就是递归函数是如何保证其他活动函数调用中的变量值不受影响的。
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给出了这个函数的源代码。
You need to do this because your parameter will get clobbered on the recursive function call, and you will need access to it afterwards.
之所以需要这么做是因为参数会在递归函数调用上被截断,而以后却还需要访问它。
But what does it actually mean Probably the best way to understand is with a real example and to do that, we need a recursive function.
它的实际意义是什么呢?可能理解它的最佳途径是接触一个实际的例子,我们需要一个递归函数。
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传递相同的值。
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.
区别在于,使用递归函数极少被迫修改任何一个变量——只需要将新值作为参数传递给下一次函数调用。
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.
了解为什么需要堆栈的最好方法是查看递归函数的情况。
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.
给出了递归函数调用时利用变量传递解决复杂问题的实例,展示了递归算法在解决非数值运算问题中的独特解题方式和效果。
But, you can only accomplish two other popular operations on a set of Numbers, finding the minimum and maximum, by a recursive template or extension function.
但是只能通过递归模板或者扩展函数来完成其他两种常见的操作:求最大值和最小值。
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.
记住当程序进行函数调用(特别是针对递归函数)时,它必须在堆栈上存储返回地址和本地变量。
This is obvious in the Visitor implementation where you see all of the recursive calls to the eval-concat function.
在访问者实现中可以清楚地看到这一点,您可以看到对eval - concat函数的所有递归调用。
If you evaluate print_report_i, you will see that there is nothing further that happens in the function after the recursive call.
如果仔细观察print _ report_i,您会发现在函数中递归调用之后没有再进一步发生任何事情。
应用推荐