Another exercise I worked on in Programming Elixir