Funs behaving differently after native compilation

Joel Reymont joelr1@REDACTED
Thu Jan 12 17:20:58 CET 2006

I worked around this by calling apply(Module, ...). Apparently {M, F}  
is deprecated.

Still, it's interesting that no error is reported and everything  
works fine when byte-compiled.

On Jan 12, 2006, at 4:03 PM, Joel Reymont wrote:

> I could certainly change things to
>     Closer = fun(Sock) -> gen_udp:close(Sock) end,
>     monitor(self(), Sock, Closer),
> for this particular case but I'm also passing the name of the  
> module from the command like to invoke the script function in it.
> I don't see how I can construct a real fun from an atom that is the  
> module name.


More information about the erlang-questions mailing list