Implement ch3.2.3's examples