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
.
$\begingroup$
$\endgroup$
1
-
$\begingroup$ possibly useful: community.wolfram.com/groups/-/m/t/792850 $\endgroup$– Jason B.Nov 20, 2017 at 23:27
Add a comment
|