var optimizeCb = function(func, context, argCount) {
if (context === void 0) {
return func;
}
switch (argCount == null ? 3 : argCount) {
case 1:
return function(value) {
return func.call(context, value);
};
case 2:
return function(value, other) {
return func.call(context, value, other);
};
case 3:
return function(value, index, collection) {
return func.call(context, value, index, collection);
};
case 4:
return function(accumulator, value, index, collection) {
func.call(context, accumulator, value, index, collection);
};
}
return function() {
return func.apply(context, arguments);
};
};