Haskell code on project Euler problems