Well, the infinity mechanism, and many of you will be familiar with this from mathematics or computer science, is recursion.
这种无限机制是递归的,你们许多人会在数学与计算机科学中,熟悉这个词
This sentence expands to a noun followed by a verb followed by a sentence and there you get recursion.
这个句子就扩展成了,一个名词,后跟一个动词,再接刚才的句子,这样就变成了递归
And the reason I want to show you this is to notice that the recursion can be doubled.
如果我来写斐波那契数列你可以看看这儿,原因是我想让你看看这部分的递归可以翻倍。
- So this is where recursion gets a little trippy-- certainly initially, and that you have to kind of keep diving deeper, deeper, deeper into the problem.
在这儿就会觉得递归有点迷糊了-,起初,你必须一层一层地,深入到问题中。
And this is obviously a toy example but you could see the use of recursion in everyday life and in everyday use of language.
这只是个小例子,但在日常生活和日常用语中,递归的应用极为广泛
All right, I want to show you one last example of using recursion because we're going to come back to this. This is a classic example of using recursion. And that is dating from the 1200s and it is due to Fibonacci.
并且返回答案,我想给你看看递归的最后一个例子,因为我们还要再看一遍,这是一个递归的经典案例,它可以追溯到13世纪。
And this too is where the power of recursion comes in in a programming language.
这也是在编程语言中,对递归很有影响的一点。
We're going to see variations of this, we're going to see a variation of it called recursion, a little later on, but for now we're just going to talk about how do we do iterations.
我们稍后会去,看它的变量,它的所谓的递归数的变量,但是现在我得先讲讲,怎么来实现迭代。
应用推荐