code: public static <T> T min(Iterable<T> self, Comparator<T> comparator) {
          T answer = null;
          boolean first = true;
          for (T value : self) {
              if (first) {
                  first = false;
                  answer = value;
              } else if (comparator.compare(value, answer) < 0) {
                  answer = value;
              }
          }
          return answer;
      }
docs: Selects the minimum value found in the Iterable using the given comparator.
  <pre class="groovyTestCase">assert "hi" == ["hello","hi","hey"].min( { a, b {@code ->} a.length() {@code <=>} b.length() } as Comparator )</pre>
  
  @param self       an Iterable
  @param comparator a Comparator
  @return the minimum value or null for an empty Iterable
  @since 2.2.0