Implement ch3.5.1's examples
Answer ex3.50