Adds exercise 6 plus the solution.

By André Greiner-Petter