A4C Algorithm implemented in Elixir