Exercises and examples from Pragmatic Programmers: Programming Erlang (2nd Edition)