Created
October 22, 2010 13:24
-
-
Save takuma7/640522 to your computer and use it in GitHub Desktop.
Project Euler - Problem 2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import System.IO | |
main = do | |
putStrLn $ show $ sum $ filter even $ takeWhile ((>) 4000000) fib | |
fib = 1:2:[ a+b | (a,b) <- zip fib (tail fib)] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment