code: function createAggregator(setter, retArray) {
        return function(collection, callback, thisArg) {
          var result = retArray ? [[], []] : {};
  
          callback = lodash.createCallback(callback, thisArg, 3);
          if (isArray(collection)) {
            var index = -1,
                length = collection.length;
  
            while (++index < length) {
              var value = collection[index];
              setter(result, value, callback(value, index, collection), collection);
            }
          } else {
            baseEach(collection, function(value, key, collection) {
              setter(result, value, callback(value, key, collection), collection);
            });
          }
          return result;
        };
      }
docs: Creates a function that aggregates a collection, creating an object or
  array composed from the results of running each element of the collection
  through a callback. The given `setter` function sets the keys and values
  of the composed object or array.
  
  @private
  @param {Function} setter The setter function.
  @param {boolean} [retArray=false] A flag to indicate that the aggregator
  function should return an array.
  @returns {Function} Returns the new aggregator function.