code: public <R> R reduce(final R initial, final BiFunction<R, ? super T, R> accumulator) {
          R returnValue = initial;
          while (iterator.hasNext()) {
              returnValue = accumulator.apply(returnValue, iterator.next());
          }
          return returnValue;
      }
docs: Performs a reduction on the elements of this stream, using the provided initial value and accumulation functions.
  
  @param initial     the initial value
  @param accumulator the acummulation function
  @param <R>         return type
  @return the result of the reduction