Implement ch1.3.4's example