Project Euler project in Haskell