Open
Description
Describe the bug
When defining a function in the erlang shell, I can call it normally in the shell. Using it in a lists:map
call results in an undefined function exception.
To Reproduce
add_one(X) ->
X + 1.
lists:map(fun(X) -> add_one(X) end, [1, 2]).
% [2, 3]
lists:map(fun add_one/1, [1, 2]).
% ** exception error: undefined function erl_eval:add_one/1
Expected behavior
I am expecting to be able to use either version of the lists:map
Affected versions
OTP 26