erlang homework