public final E reduce(@NotNull PairFunction<? super E, ? super E, ? extends E> function) {
    boolean first = true;
    E cur = null;
    for (E e : this) {
      if (first) {
        cur = e;
        first = false;
      }
      else {
        cur = function.fun(cur, e);
      }
    }
    return cur;
  }
public final E reduce(@NotNull PairFunction<? super E, ? super E, ? extends E> function)