code: public static <T> EntryStream<T, T> ofPairs(List<T> list) {
          return of(new PairPermutationSpliterator<>(list, SimpleImmutableEntry::new));
      }
docs: Returns a sequential ordered {@code EntryStream} containing the possible
  pairs of elements taken from the provided list.
  
  <p>
  Both keys and values are taken from the input list. The index of the key
  is always strictly less than the index of the value. The pairs in the
  stream are lexicographically ordered. For example, for the list of three
  elements the stream of three elements is created:
  {@code Map.Entry(list.get(0), list.get(1))},
  {@code Map.Entry(list.get(0), list.get(2))} and
  {@code Map.Entry(list.get(1), list.get(2))}. The number of elements in
  the resulting stream is {@code list.size()*(list.size()+1L)/2}.
  
  <p>
  The list values are accessed using {@link List#get(int)}, so the list
  should provide fast random access. The list is assumed to be unmodifiable
  during the stream operations.
  
  @param <T> type of the list elements
  @param list a list to take the elements from
  @return a new {@code EntryStream}
  @see StreamEx#ofPairs(List, BiFunction)
  @since 0.3.6