function reduce(array, callback) {
    var accumulator = null;
    each(array, function(value, index) {
      accumulator = callback(accumulator, value, index, array);
    });
    return accumulator;
  }
A bare-bones `Array#reduce` like utility function.

@private
@param {Array} array The array to iterate over.
@param {Function} callback The function called per iteration.
@returns {*} The accumulated result.