Solution to exercise 1.8