thoga31

Project Euler, problem 2

Mar 22nd, 2014
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. euler2 n = sum . takeWhile (<n) . filter (even) $ fibonacci
  2.   where
  3.     fibonacci = 0 : 1 : zipWith (+) fibonacci (tail fibonacci)
  4.  
  5. main = putStrLn . show . euler2 $ ((4*) (10^6))
Advertisement
Add Comment
Please, Sign In to add comment