Implement ch1-1-6's examples
Answer ex1.1