haskell problem 6