Project Euler problems'  solution in Haskell