Add solution to Exercise 2.3.