2 ms·
Currying is stupid. It's more complicated and less flexible than just explicitly defining a new function. For example, try to do this with currying: var
by tiglionabbit 13y ago
Currying is stupid. It's more complicated and less flexible than just explicitly defining a new function. For example, try to do this with currying:
var x = function(a,b,c){ return a - b * c };
var y = function(a,b) { return x(a, b, 5) };
Also, currying is married to positional arguments. What if you're trying to use keyword arguments? Can you curry this?
var x = function(params) {
return params.top - params.bottom;
}