Chapter 6 first exercise

Others will follow later.