code: function groupOn(f, xs) {
      return groupBy((a, b) => f(a) === f(b), xs);
  }
docs: Splits an array based on the equivalence relation induced by the function.
  The concatenation of the result is equal to the argument.