Working through the examples in Programming Erlang, 2nd ed