[erlang-questions] Anonymous functions or callback module - Performance
Wed Nov 28 22:03:09 CET 2012
On 2012-11-28 21:36, Daniel Goertzen wrote:
> This code...
> FList = [F1 = fun callback_module:fun_1/1 end... F1 = fun
> ... has led me to another question for the mailing list: Will these
> funs automatically use a new version of loaded module or are they
> permanently fixed to the old version?
Yes, those symbolic funs using the "fun foo:bar/1" notation always use
the latest version of the module when you apply them. They are not tied
to any particular module version. (However, funs that use the syntax
"fun foo/1", are tied to that version of the module, just as if they had
been written "fun (X) -> foo(X) end", since the function foo(X) isn't
More information about the erlang-questions