Implement ch3.1.1's examples