code: public static <T extends Iterable<U>, U> Comparator<T> lexComparator(Comparator<U> elemComp) {
          return new LexComparator<>(elemComp);
      }
docs: Retrieves a lexicographical comparator for the given type.
  
  @param elemComp
  the comparator to use for comparing the elements.
  
  @return a comparator for comparing objects of type <code>T</code> based on lexicographical ordering.