> In ApproxFun, a user supplied function is approximated.  the
> approximation depends on whether the function is univariate or
> bivariate

How does it work, if the user defines several methods?

f(x) = x
f(x,y) = x+y

>> The method_exists function would probably be a slightly cleaner way
>> to do this. 

method_exists should be good for generic functions but it does not work
with anonymous functions.  I think this gives you the number of
arguments:

length(Base.uncompressed_ast(( (x,y,z)->1 ).code.def).args[1])

something similar should let you figure out whether a one-argument
signature is a tuple.  Not sure though this is the preferred approach.

Reply via email to