Code examples from the book.