Implement ch1.2.1's examples