haskell: solution for problem 32