haskell problem 7