Skip to content

Instantly share code, notes, and snippets.

@dbyrne
Created March 23, 2011 04:55
Show Gist options
  • Save dbyrne/882641 to your computer and use it in GitHub Desktop.
Save dbyrne/882641 to your computer and use it in GitHub Desktop.
Project Euler #2 - Haskell
fibs = 1 : 2 : zipWith (+) fibs (tail fibs)
prob2 = sum $ takeWhile (< 4000000) $ filter even fibs
main = putStrLn (show prob2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment