Exercise 2-6 from the book.