*
@method groupBy(<map>, [fn])
@returns Object
@short Groups the array by <map>.
@extra Will return an object with keys equal to the grouped values. <map> may be a mapping function, or a string acting as a shortcut. Optionally calls [fn] for each group.
@example

['fee','fi','fum'].groupBy('length') -> { 2: ['fi'], 3: ['fee','fum'] }
+   [{age:35,name:'ken'},{age:15,name:'bob'}].groupBy(function(n) {
return n.age;
});                                  -> { 35: [{age:35,name:'ken'}], 15: [{age:15,name:'bob'}] }

*
function(map, fn) {
      var arr = this, result = {}, key;
      arrayEach(arr, function(el, index) {
        key = transformArgument(el, map, arr, [el, index, arr]);
        if(!result[key]) result[key] = [];
        result[key].push(el);
      });
      if(fn) {
        iterateOverObject(result, fn);
      }
      return result;
    }