Implement ch1.2.6's examples (in progress)