public static <T, C> Collector<T, ?, MapStream<C, List<T>>> groupBy(Function<T, C> grouper) {
        return Collector.of(
            () -> new GroupHolder<>(grouper),
            GroupHolder::add,
            GroupHolder::merge,
            GroupHolder::finisher
        );
    }
Returns a new {@link MapStream} where the elements have been grouped together using
the specified function.

@param <T>      the stream element type
@param <C>      the type of the key to group by
@param grouper  the function to use for grouping
@return         a {@link MapStream} grouped by key
common-parent/mapstream/src/main/java/com/speedment/common/mapstream/util/CollectorUtil.java