Exercises from Real World haskell