Exercise 3.28 resolved