Util.operators: allow variadic methods to work with arrays

Variadic util operators, such as _.add(), can now work with argument arrays.

e.g. `_.add([1,2,3]) === 6`
I mean it's a hefty deoptimization

On Mon, Oct 20, 2014 at 10:16 AM, jacobpurcell <notifications@github.com>
wrote:

> In underscore.util.operators.js:
>
> > @@ -24,10 +25,13 @@
> >    function variadicComparator(comparator) {
> >      return function() {
> >        var result;
> > -      for (var i = 0; i < arguments.length - 1; i++) {
> > -        result = comparator(arguments[i], arguments[i + 1]);
> > +      var numbersToCompare = _(arguments).flatten();
>
> What if I did _.flatten(arguments, true)
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/documentcloud/underscore-contrib/pull/180/files#r19086659>
> .
>