My solution to the book's exercises.