My first Erlang code. Solution to jaerlang2/chapter4/exercise5.