Skip to content

Instantly share code, notes, and snippets.

@takuma7
Created October 22, 2010 13:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save takuma7/640522 to your computer and use it in GitHub Desktop.
Save takuma7/640522 to your computer and use it in GitHub Desktop.
Project Euler - Problem 2
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