stuff & things

-
May 11

Euler Problem #2, redux

This is a similar attempt, not sure if it’s better or worse really, but uses comprehensions instead.

{ for i in [1..33] do
let x = fib(i)
if x < 4000000 && x % 2 = 0 then yield x }
|> Seq.sumByInt(fun x -> x)


Comments (View)
blog comments powered by Disqus
Page 1 of 1