code: public static <T> Stream<List<T>> groupRuns(Stream<T> source, Comparator<T> comparator){
          return StreamSupport.stream(new GroupRunsSpliterator<>(source.spliterator(), comparator), false)
                  .onClose(source::close);
      }
docs: Constructs a stream that represents grouped run using the custom comparator. This means
  that similar elements will get grouped into a list. I.e. given a list of [1,1,2,3,4,4]
  you will get a stream of ([1,1], [2], [3], [4, 4])
  
  @param source The input stream
  @param comparator The comparator to determine if neighbor elements are the same
  @param <T> The type over which to stream
  @return A stream of lists of grouped runs