First an example: f[x_,y_]:=x+y would have arity 2 because it takes 2 inputs while the function g[x]:=0 has arity 1, even though it doesn't change with the input. Is there a way to find the arity of a function? Something like a symbol Arity that evaluates Arity[f] to 2.



Browse other questions tagged or ask your own question.