3 ms·
> I think you might have the condition the wrong way around, Yes I do! I did this just minutes before rushing out the door, and didn't even bother to run it.
by kazinator 7y ago
> I think you might have the condition the wrong way around,
Yes I do! I did this just minutes before rushing out the door, and didn't even bother to run it.
Now, the funny thing is, I was focused on paraphrasing your Python expression for expression, so that it calculates Fibonacci in exactly the same way with the same conventions, so any size comparisons are fair. (Though obviously I took advantage of the pred and ppred idioms.) I wasn't thinking "is this correct Fib", but "does it match whatever the Python is doing".
So now I'm looking at: why did I transcribe the simple conditional backwards? Taking a second look at the Python, I now clearly see the reversed convention in 1 >= n that I read as n >= 1.