public static <T, R> R reduce(@NotNull Iterable<? extends T> iterable,
                                @Nullable R initialValue,
                                @NotNull BiFunction<? extends R, ? super R, T> function) {
    R currentResult = initialValue;
    for (T e : iterable) {
      currentResult = function.fun(currentResult, e);
    }
    return currentResult;
  }
public static <T, R> R reduce(@NotNull Iterable<? extends T> iterable,
                                @Nullable R initialValue,
                                @NotNull BiFunction<? extends R, ? super R, T> function)