Haskell #8: Solution