7 lines
152 B
Haskell
7 lines
152 B
Haskell
|
module Main where
|
||
|
|
||
|
fibonacci = map fst (iterate (\(n, m) -> (m, n+m)) (0, 1))
|
||
|
|
||
|
main = do
|
||
|
print (sum (filter even (takeWhile (<4000000) fibonacci)))
|