docs: public static <S,T> Collection<T> collect(Iterable<S> self, Collection<T> collector, @ClosureParams(FirstParam.FirstGenericType.class) Closure<? extends T> transform) {
          for (S item : self) {
              collector.add(transform.call(item));
              if (transform.getDirective() == Closure.DONE) {
                  break;
              }
          }
          return collector;
      }