code: @NotNull
      public OptionalLong reduce(@NotNull LongBinaryOperator accumulator) {
          boolean foundAny = false;
          long result = 0;
          while (iterator.hasNext()) {
              final long value = iterator.nextLong();
              if (!foundAny) {
                  foundAny = true;
                  result = value;
              } else {
                  result = accumulator.applyAsLong(result, value);
              }
          }
          return foundAny ? OptionalLong.of(result) : OptionalLong.empty();
      }
docs: Performs a reduction on the elements of this stream, using an
  associative accumulation function, and returns an {@code OptionalLong}
  describing the reduced value, if any.
  
  <p>The {@code accumulator} function must be an associative function.
  
  <p>This is a terminal operation.
  
  @param accumulator  the accumulation function
  @return the result of the reduction
  @see #reduce(com.annimon.stream.function.LongBinaryOperator)