I am having an Erlang
module that exports two methods with the same name but different arity: proc/1
and proc/2
.
When using the methods in the form of MFA
, how do you specify that the /2
should be used or /1
? See for example:
spawn(?MODULE,proc,[22]) % how to tell i want the `/1` arity method
spawn(?MODULE,proc,[11,22]) % `/2`arity method
The number of elements in your list of arguments specifies if you are using
/1
or/2
:Here I am using
apply/3
and using theModule:Function:Args
format to first callreverse/1
and thenreverse/2
.