Faking a recursive closure in elixir