haskell 002
parent
46b96327d5
commit
b2e1e06499
|
@ -0,0 +1,6 @@
|
|||
module Main where
|
||||
|
||||
fibonacci = map fst (iterate (\(n, m) -> (m, n+m)) (0, 1))
|
||||
|
||||
main = do
|
||||
print (sum (filter even (takeWhile (<4000000) fibonacci)))
|
Loading…
Reference in New Issue