var curry = function (fn) {
var args = [].slice.call(arguments, 1);
return function() {
var newArgs = args.concat([].slice.call(arguments));
return fn.apply(this, newArgs);
};
};
function curry(fn, args) {
var length = fn.length;
args = args || [];
return function() {
var totalArgs = args.slice(), arg, i;
for (i = 0; i < arguments.length; i++) {
arg = arguments[i];
totalArgs.push(arg);
}
if (totalArgss.length < length) {
return curry.call(this, fn, totalArgss);
}
return fn.apply(this, totalArgss);
}
}