So JavaScript's bind
supports currying, but most people use some other library like lodash
or ramda
to do currying.
From first impression It seems like bind
supports context changing, since that is it's intended role, e.g.
var replaceTest = replace.bind(this, 'test')
replaceTest('beta', environments)
The other curry methods don't have this.
var replace = _.curry(function (a, b, list) {
// implementation
})
var replaceTest = replace('test')
replaceTest('beta', environments)
So are there any other difference between the two methods? Mainly I want to know if it makes sense to use one of those implementations when there is a native implementation present.