Normally, functional languages eschew the while loop, because most of what while does can be done instead with recursion.
通常,函数语言会避开while循环,因为while实现的大多数操作都可以使用递归来完成。
Usually this means there's too many loops (as opposed to too much happening in a loop), too much recursion, or simply too many different operations being performed.
通常情况是函数内包含了过多的循环(不是在循环中执行了过多的内容),太多的递归,或者只不过是太多不相干但又要一起执行的操作。
However, this isn't the only way to solve the problem. Instead of a loop, you can use recursion, like so.
但是这并不是解决问题的惟一办法。
Recursion is a more powerful algorithm than iterative loop.
递归是比迭代循环更有力的算法。
In this recursion pattern, two functions each call the other, such that an infinite loop is formed.
在这种递归模式中,两个函数互相调用对方,形成一个无限循环。
Make sure you do not have an infinite loop or infinite recursion.
确保您没有无限循环或无限递归。
A positive feedback loop has far-reaching repercussions on the system that triggered the recursion.
一个确定的反馈电路在引发递推的系统上有深远的反应。
A positive feedback loop has far-reaching repercussions on the system that triggered the recursion.
一个确定的反馈电路在引发递推的系统上有深远的反应。
应用推荐