Problem 8, haskell