So let's look at a little example, and this is going to, excuse me, both allow us introduce the syntax as well as what we want to have as the flow of control inside of here.
让我们看个小例子,这个程序会,对不对,请允许我,一边顺着控制流进行,一边讲解语法。
and there are, you know, two great little cosmetology places down the way
另外,顺着这条路还有两个小美容店,
And think of it this way.
现在顺着这个逻辑来思考
I'll let you just grok it but you can see it's basically doing what I did over there. Setting up two indices for the two sub-list,it's just walking down, finding the smallest element, putting it into a new list. When it gets to the end of one of the lists, it skips to the next part, and only one of these two pieces will get called because only one of them is going to have things leftovers.
你们可以大体的浏览一下,但是它们基本就是我在那里所做的事情,为两个子列表设置了两个指针,指针顺着列表走下去,找到最小的元素,把它放入到一个新的列表中去,当它走到一个列表的尾部时,它会跳到下部分去,两部分中只有一个会被执行,因为只有一个会有元素剩余。
Let's say that the British Government didn't say that they'll pay one pound per year, but it'll be one pound the first year, then it will grow at the rate g and it will eventually be infinitely large.
我们假设英国政府并没有说,他们会每一年支付一英镑,但它会是第一年支付一英镑,然后它会顺着利率g上涨,最后它就变成了无尽大的数目
应用推荐