code: function(key) {
          return function group(arr) {
            return arr.reduce(function(obj, item) {
              (obj[item[key]] = obj[item[key]] || []).push(item);
              return obj;
            }, {});
          }
        }
docs: Groups together related prop values from an array of objects.
  
  groupBy :: (a) → (arr) → obj
  
  @param key - A property name used to do the grouping
  @returns function
  @param arr - An array of objects
  @returns An object of key-value pairs grouped by the key