code: public static <E extends Comparable<? super E>> Stream<Map.Entry<E, E>> crossProductNaturallyOrdered(Stream<E> stream) {
          Objects.requireNonNull(stream);
  
          CrossProductOrderedSpliterator<E> spliterator =
                  CrossProductOrderedSpliterator.ordered(stream.spliterator(), Comparator.naturalOrder());
  
          return StreamSupport.stream(spliterator, stream.isParallel()).onClose(stream::close);
      }
docs: <p>Generates a stream of <code>Map.Entry&lt;E, E&gt;</code> elements with all the cartesian product of the
  elements of the provided stream with itself, in which the entries are such that the key is
  strictly lesser than the value, using the natural order of <code>E</code>.</p>
  <p>For a stream <code>{a, b, c}</code>, a stream with the following elements is created:
  <code>{(a, b), (a, c), (b, c)}</code>, where
  <code>(a, b)</code> is the <code>Map.Entry</code> with key <code>a</code> and value <code>b</code>.</p>
  <p>A <code>NullPointerException</code> will be thrown if the provided stream is null.</p>
  
  @param stream the processed stream
  @param <E>    the type of the provided stream
  @return a stream of the cartesian product