Haskell #9: Solution