// Generated by CoffeeScript 1.10.0
(function() {
  var reduce;

  reduce = function(collection, reducer, value) {
    return Promise.all(collection).then(function(items) {
      return items.reduce(function(promise, item, index, length) {
        return promise.then(function(value) {
          return reducer(value, item, index, length);
        });
      }, Promise.resolve(value));
    });
  };

  module.exports = reduce;

}).call(this);

//# sourceMappingURL=promise_reduce.js.map
