Exercise for Chapter 4.