My solution to exercises of book "erlang programming"