code: function group(ary, fn) {
      return ary.reduce(function(accumulator, curr) {
        var key = fn(curr);
  
        if (key in accumulator)
          accumulator[key].push(curr);
        else
          accumulator[key] = [curr];
  
        return accumulator;
      }, {});
    }
docs: Returns a new dictionary with items grouped by the return value of the
  specified function being called on each item.
  @param {!Array.<Object>} ary The array being iterated through
  @param {!Function} fn The mapping function between the array value and the
  map key.