is_function vs tuples (functions in non-local modules)

David N. Welton davidw@REDACTED
Fri Jun 11 12:20:38 CEST 2004

Here's another one that's got me scratching my head:

1> c(parser).
2> parser:tr("x").
3> Fun = {parser, tr}.
4> Fun("x").
5> {parser, tr}("x").
6> is_function(Fun).
7> is_function({parser, tr}).

Is there any way to tell?

Reason being, I want to pass a list of things to a function.  This 
function should only call the ones that are actually functions.  I guess 
I could use catch, but that's got it's own problems (if it is a function 
and it errors out, I want the error to be passed on up) and doesn't seem 

Thankyou once again for your time,
David N. Welton

More information about the erlang-questions mailing list