You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 31, 2022. It is now read-only.
From that discussion, it seems that it'd be better for named curry to accept the argument names instead of just the number of arguments. This is my experience as well.
Otherwise, we may fall into the following trap. See that we expected 'z' but got 'k'.
I think there could be merit to this way of doing currying, but I don't think it would be justified to replace the existing currying. This would need to be a new method. Any thoughts on what it should be called? We already have "curry" and "curryMultiple", so maybe something like "curryExpected" or...?
Hi Kyle, love this lib!
I've thought about this in the past as well.
From that discussion, it seems that it'd be better for named curry to accept the argument names instead of just the number of arguments. This is my experience as well.
Otherwise, we may fall into the following trap. See that we expected 'z' but got 'k'.
I like https://github.com/rjmk/named-curry implementation better. Although more verbose, it's safer and more flexible.
Also, you get "optional arguments" for free.
I'd be willing to write the code, but it is a breaking change.
The text was updated successfully, but these errors were encountered: