reactor-core/src/main/java/reactor/core/publisher/Flux.java
public final <A> Mono<A> reduceWith(Supplier<A> initial, BiFunction<A, ? super T, A> accumulator) {
		return Mono.onAssembly(new MonoReduceSeed<>(this, initial, accumulator));
	}
public final <A> Mono<A> reduceWith(Supplier<A> initial, BiFunction<A, ? super T, A> accumulator) {
		return Mono.onAssembly(new MonoReduceSeed<>(this, initial, accumulator));
	}
public final < A > Mono < A > reduceWith ( Supplier < A > initial , BiFunction < A , ? super T , A > accumulator ) { return Mono . onAssembly ( new MonoReduceSeed <> ( this , initial , accumulator ) ) ; }
Reduce the values from this {@link Flux} sequence into a single object matching the
type of a lazily supplied seed value. Reduction is performed using a
{@link BiFunction} that takes the intermediate result of the reduction and the
current value and returns the next intermediate value of the reduction. First
element is paired with the seed value, supplied via {@literal initial}.

<p>
<img class="marble" src="doc-files/marbles/reduceWith.svg" alt="">

@reactor.discard This operator discards the internally accumulated value upon cancellation or error.

@param accumulator the reducing {@link BiFunction}
@param initial a {@link Supplier} of the seed, called on subscription and passed to the the reducing {@link BiFunction}
@param <A> the type of the seed and the reduced object

@return a reduced {@link Flux}
Reduce the values from this { @link Flux } sequence into a single object matching the type of a lazily supplied seed value . Reduction is performed using a { @link BiFunction } that takes the intermediate result of the reduction and the current value and returns the next intermediate value of the reduction . First element is paired with the seed value supplied via { @literal initial } .