Code for Programming Erlang - Chapter 2