problem12 haskell