Exercises in erlang