haskell problem 8