Open
Description
Improperly handling arity can be a hard to track down source of error, especially when composing functions, but I would want (_ + _)(2)
to return a function that looked like "(x1) => (2 + x1)"
such that (_ + _)(2, 3)
and (_ + _)(2)(3)
would be equivalent and both result in 5
.
I can understand the intent of the TypeError and it could actually be the best approach to ease problems dealing with composition and with standard python functions, e.g.
list(filter(_ < _, [9,10,11]))
would be problematic. However, it might be worth considering the curried behavior.