lib/decider/tasks/accumulator.js
function Accumulator(name, deps, fragment, resultsFn, options) {
  if (!(this instanceof Accumulator)) {
    return new Accumulator(name, deps, fragment, resultsFn, options);
  }

  Task.apply(this, Array.prototype.slice.call(arguments));

  this.fragment = fragment;

  if (!_.isFunction(resultsFn)) {
    throw new Error('You must provide a function to indicate when the accumulator is complete');
  }

  this.resultsFn = resultsFn;
  this.options = options || {};
}
function Accumulator(name, deps, fragment, resultsFn, options) {
  if (!(this instanceof Accumulator)) {
    return new Accumulator(name, deps, fragment, resultsFn, options);
  }

  Task.apply(this, Array.prototype.slice.call(arguments));

  this.fragment = fragment;

  if (!_.isFunction(resultsFn)) {
    throw new Error('You must provide a function to indicate when the accumulator is complete');
  }

  this.resultsFn = resultsFn;
  this.options = options || {};
}
function Accumulator ( name , deps , fragment , resultsFn , options ) { if ( ! ( this instanceof Accumulator ) ) { return new Accumulator ( name , deps , fragment , resultsFn , options ) ; } Task . apply ( this , Array . prototype . slice . call ( arguments ) ) ; this . fragment = fragment ; if ( ! _ . isFunction ( resultsFn ) ) { throw new Error ( 'You must provide a function to indicate when the accumulator is complete' ) ; } this . resultsFn = resultsFn ; this . options = options || { } ; }
The Accumulator loop executes the `fragment` until the `resultsFn` returns an empty array,
the results of each execution are then pushed into an array via the `resultsFn` for use by other tasks.

@constructor
The Accumulator loop executes the fragment until the resultsFn returns an empty array the results of each execution are then pushed into an array via the resultsFn for use by other tasks .