scala implementation of the baseball throwing processes kata for elixir