Fix erlang code example 'fun'

Shouldn't call a function "fun" in erlang code.
Update the erlang function naming to match the Elixir code.