This is my lazy loader for functions:
var make_lazy = function (calledFunc, a, b, c, d, e, f) {
return function () {
return calledFunc(a, b, c, d, e, f)
}
};
It works with most functions except this one:
function superAdd() {
return Array.prototype.slice.apply(arguments).reduce(function (a, c) {
return a + c;
}, 0);
}
How do I modify this function to accept a variable number of arguments? I tried using the arguments object with no success.
superAdd? Can you show a complete example of the implementation that's not working?function make_lazy(fn, args) {return Function.apply.bind(fn, this, args);};