code: public static <T, V extends Comparable<? super V>> T maxBy(Iterable<T> iterable, Function<? super T, ? extends V> function)
      {
          if (iterable instanceof RichIterable)
          {
              return ((RichIterable<T>) iterable).maxBy(function);
          }
          if (iterable instanceof RandomAccess)
          {
              return RandomAccessListIterate.maxBy((List<T>) iterable, function);
          }
          if (iterable != null)
          {
              return IterableIterate.maxBy(iterable, function);
          }
          throw new IllegalArgumentException("Cannot perform a maxBy on null");
      }
docs: Returns the maximum element out of the iterable based on the natural order of the attribute returned by the function.