If I come into this code, I'm going to check this branch first, if it's not true, ah, there's a return at the end of that branch. If it is true, I do that, and then I've got a second test. If it's true, return I return, otherwise a return.
但是如果我们看看这里,如果我看这段程序,我会先检查这一部分,如果它是假的,啊,这部分分支结尾有一个。
So I actually want to have type checking as much as I can early on.
因此我会在尽可能早的地方去,做一个类型检查。
Well, now I go through code very much like what I did for max val in the first place. I check whether it's 0, et cetera, et cetera.
现在我会捋一遍代码,就像我之前捋maxval函数一样,我会检查它是不是0等等等等。
应用推荐