[erlang-questions] Convert atom and arity into fun

Andras Georgy Bekes bekesa@REDACTED
Fri Sep 5 13:09:19 CEST 2008


>     F = fun mod:name/arity,        % or fun name/arity if local function
>     F(Arg1, Arg2, ...) 

If you don't really need a fun to pass around, just want to call the
function, then simply:
Mod:Name(Arg1,Arg2...)

use apply/3 only if you don't know the arity at compile time.

	Georgy



More information about the erlang-questions mailing list