code: @Contract(pure = true)
  	@NotNull
  	public static <T> Promise<T[]> toArray(@NotNull Class<T> type, @NotNull List<? extends Promise<? extends T>> promises) {
  		int size = promises.size();
  		if (size == 0) return toArray(type);
  		if (size == 1) return toArray(type, promises.get(0));
  		if (size == 2) return toArray(type, promises.get(0), promises.get(1));
  
  		@SuppressWarnings("unchecked") PromiseToArray<T> resultPromise = new PromiseToArray<>((T[]) Array.newInstance(type, size));
  
  		for (int i = 0; i < size; i++) {
  			Promise<? extends T> promise = promises.get(i);
  			if (promise.isResult()) {
  				resultPromise.accumulator[i] = promise.materialize().getResult();
  				continue;
  			}
  			if (promise.isException()) return Promise.ofException(promise.materialize().getException());
  			int index = i;
  			resultPromise.countdown++;
  			promise.whenComplete((result, e) -> {
  				if (e == null) {
  					resultPromise.processComplete(result, index);
  				} else {
  					resultPromise.tryCompleteExceptionally(e);
  				}
  			});
  		}
  		return resultPromise.countdown != 0 ? resultPromise : Promise.of(resultPromise.accumulator);
  	}
docs: Reduces promises into Promise&lt;Array&gt;