[elixir] remove anonymous function