[erlang-questions] Imported function as argument
Mon Jan 27 11:24:18 CET 2014
I recently bumped into the following issue. I expected that it was possible to use an imported function as argument in a higher-order function. For example:
-import(lists, [reverse/1, map/2]).
map(fun reverse/1, Xss).
However, the compiler complains that reverse/1 is undefined:
bla.erl:8: function reverse/1 undefined
Is it mandatory to give the fully qualified function name for an external function when it is used as argument in a higher-order function?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions