Examples and exercises from the book Real World Haskell