-
Notifications
You must be signed in to change notification settings - Fork 6
Description
I note that in the lodash implementation of curry
Note: This method does not set the "length" property of curried functions.
So someone, at least, thinks that is not necessary. And I cannot really think of use cases where it is. Of course we want to be able to find the length of functions like function add(a, b), but in what cases do we need to know the length of add::curry()(1)?
I raise this point because the util-arity approach introduces another layer of nested function which will have a performance impact (I don't like the way util-arity is implemented, either, but that's a separate issue), it introduces extraneous elements into stack traces, and so on.
Then again, the https://github.com/dominictarr/curry library does maintain arity.
Do we really need to maintain arity on the result of currying a function?