Exercise 3.10 resolved