raywu/eulers — comment on commit f833b28885dc42ac33f399e23e010bc8a837a419
File:  line 0
By blake41:

ya i'm all about readability. i don't usually use the inject method for that reason. it confuses me when i look at it.

the first time i tried it i didn't. that builds an array of all the fib numbers up to 4 million. which is more memory than i have on my system, and it blew up. but really we only need the last two numbers of the fib sequence on each iteration, so i'm dropping the first number in the array each time for memory management reasons

but i'm going to ask my boss if there's a faster/better way to do this. mine had been running for an hour when i left for work this morning...