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
Some built-in methods are rather useful, but they can be used only as methods and cannot be used as simple function with one argument for map etc.
Function.call.bind can help us, but this is a bit clumsy.
_.callBind = function (fn) { return fn.call.bind(fn); }
Also this could be useful for "uncurrying" 1 argument, like e.g.
someString.replace(/&#(\d+);/g, _.callBind(String.fromCharCode));
The text was updated successfully, but these errors were encountered:
Some built-in methods are rather useful, but they can be used only as methods and cannot be used as simple function with one argument for map etc.
Function.call.bind can help us, but this is a bit clumsy.
_.callBind = function (fn) { return fn.call.bind(fn); }
Also this could be useful for "uncurrying" 1 argument, like e.g.
someString.replace(/&#(\d+);/g, _.callBind(String.fromCharCode));
The text was updated successfully, but these errors were encountered: