code: @NotNull
      public OptionalInt reduce(@NotNull IntBinaryOperator op) {
          boolean foundAny = false;
          int result = 0;
          while(iterator.hasNext()) {
              int value = iterator.nextInt();
  
              if(!foundAny) {
                  foundAny = true;
                  result = value;
              } else {
                  result = op.applyAsInt(result, value);
              }
          }
          return foundAny ? OptionalInt.of(result) : OptionalInt.empty();
      }
docs: Performs a reduction on the elements of this stream, using an
  associative accumulation function, and returns an {@code OptionalInt}
  describing the reduced value, if any.
  
  <p>The {@code op} function must be an associative function.
  
  <p>This is a terminal operation.
  
  @param op an associative, non-interfering, stateless function for
  combining two values
  @return the result of the reduction
  @see #reduce(int, IntBinaryOperator)