code: public static <U, T> StreamEx<T> ofPairs(List<U> list, BiFunction<? super U, ? super U, ? extends T> mapper) {
          return of(new PairPermutationSpliterator<>(list, mapper));
      }
docs: Returns a sequential ordered {@code StreamEx} containing the results of
  applying the given mapper function to the all possible pairs of elements
  taken from the provided list.
  
  <p>
  The indices of two elements supplied to the mapper function are always
  ordered: first element index is strictly less than the second element
  index. The pairs are lexicographically ordered. For example, for the list
  of three elements the stream of three elements is created:
  {@code mapper.apply(list.get(0), list.get(1))},
  {@code mapper.apply(list.get(0), list.get(2))} and
  {@code mapper.apply(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 <U> type of the list elements
  @param <T> type of the stream elements
  @param list a list to take the elements from
  @param mapper a non-interfering, stateless function to apply to each pair
  of list elements.
  @return a new {@code StreamEx}
  @see EntryStream#ofPairs(List)
  @since 0.3.6