Dynamically invoking unexported function

Dominic Williams xpdoka@REDACTED
Mon Jan 16 21:58:45 CET 2006

Hi Bengt,

> have you tried:
> {Pid, Request, Arguments} ->
>        Request(Arguments);    % (*)

Indeed, that's what I started with. It produces a badfun runtime error 
when Request is an atom (a fact I might not have made clear from my 
first post). That syntax only works on funs.

> bengt, who would like to suggest the variable name Argument, since 
> this only works on an arity 1 Request

Well, I tend to name variables semantically and - as I hinted at with 
foo({X,Y}) - in my specific problem the variable actually gets bound to 
a tuple holding several arguments.


Dominic Williams


More information about the erlang-questions mailing list