problem9 haskell