This is returned, and the next function waiting is reactivated.
然后将这个结果返回,并重新激活下一个等待的函数。
We want to write a function that given a function to compute the sum of a sequence, gives us the next function to compute the sum of a sequence.
我们要编写一个返回另一个函数的函数,用返回的函数计算对序列求和。
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.
区别在于,使用递归函数极少被迫修改任何一个变量——只需要将新值作为参数传递给下一次函数调用。
Literally, return the control from this function, and take the value of the next expression, and return that as the value of the whole computation.
正如字面意义上说的,从这个函数返回,然后取得下一个表达式的值,并把这个值作为整个计算的结果返回。
Now if you call a function, swap like increment or cube or swap, or in this case, foo, those variables are the parameters to that function, end up getting stored next in memory.
现在如果你调用一个函数,像increment或者cube或者,或者在这个例子里,foo,这些变量都是,函数的参数,在内存中存储。
So we hit the curly brace so the very bottom of the function and as soon as you hit that, the next line in the story is well, then we return to main and where are we executing in main?
我们抵达花括号了,这是函数的末尾了,一旦到了那个地方,在下一行,然后返回到main函数中,在main中哪里开始执行?
应用推荐