Is it possible to write a function arity :: a -> Integer to determine the arity of arbitrary functions, such that
arity :: a -> Integer
> arity map 2 > arity fol
If id has arity 1, shouldn't id x have arity 0? But, for example, id map is identical to map, which would has arity 2 in your example.
id
id x
id map
map
Have the following functions the same arity?
f1 = (+) f2 = (\x y -> x + y) f3 x y = x + y
I think your notion of "arity" is not well defined...