Erlang Exercises For HW1

Trying to solve HW1 in Erlang too. Because Erlang is fun.