Someone can explain this erlang function call format: do(Param, {?MODULE,[a]})

132 Views Asked by At

example:

-module(func).

%% ====================================================================
%% API functions
%% ====================================================================
-export([do/2]).


do(Param, {?MODULE,[a]}) ->
    Param.

Why I can call the function by

{func,[a]}:do(1)

The call succ by returning "1".

I cannot see any explanation in Erlang doc. But There are many usage in mochiweb such as: https://github.com/mochi/mochiweb/blob/master/src/mochiweb_request.erl

0

There are 0 best solutions below