code: public static <K, V, C extends Collection<V>> Map<K, C> groupBy(Iterator<V> groupies, Function<V, K> grouper, Supplier<C> collectionProvider) {
          return new GroupBy<>(grouper, collectionProvider, new HashMapFactory<>()).apply(groupies);
      }
docs: Groups elements from an iterator in the key evaluated from the passed
  function. E.g:
  <code>groupBy([1, 2, 3, 1], id) -> { 1: [1,1], 2: [2], 3: [3]}</code>
  
  @param <K> the grouped key type
  @param <V> the grouped value type
  @param <C> the collection type used as value of the map
  @param groupies the elements to be grouped
  @param grouper the function used to group elements
  @param collectionProvider the values collection supplier
  @return a map containing grouped values