7 lines
149 B
Haskell
7 lines
149 B
Haskell
|
main :: IO()
|
||
|
main = do
|
||
|
print (sum ret)
|
||
|
where
|
||
|
fibs = 1 : 2 : zipWith (+) fibs (tail fibs)
|
||
|
ret = filter even (takeWhile (<= 4000000) fibs)
|