-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
I am wondering if shaving is something that makes sense as a feature of curry-this.
Shaving is a good thing, and of course there are times when we want to do that. However, to me it makes more sense to have this be a separate feature (probably in some other functional library), rather than baked into currying. Is there a precedent for shaving in other currying libraries? If I need shaving, I can write it quite easily as:
function shave(fn, n) {
return function() { return fn.apply(this, [].slice.call(arguments, 0, n); };
}
I'd rather do this explicitly myself rather than have it be a side effect of passing placeholders to the curry function. In this approach, fn::curry(_, _) is equivalent to fn::curry(), with no shaving implications.
Metadata
Metadata
Assignees
Labels
No labels