programming erlang - chapter 4