MCPcopy Index your code
hub / github.com/ReactiveX/RxJava / reduce

Method reduce

src/main/java/io/reactivex/rxjava3/core/Flowable.java:13505–13512  ·  view source on GitHub ↗

Returns a Maybe that applies a specified accumulator function to the first item emitted by the current Flowable, then feeds the result of that function along with the second item emitted by the current Flowable into the same function, and so on until all items have been emitt

(@NonNull BiFunction<T, T, T> reducer)

Source from the content-addressed store, hash-verified

13503 * @see <a href="http://en.wikipedia.org/wiki/Fold_(higher-order_function)">Wikipedia: Fold (higher-order function)</a>
13504 */
13505 @CheckReturnValue
13506 @NonNull
13507 @BackpressureSupport(BackpressureKind.UNBOUNDED_IN)
13508 @SchedulerSupport(SchedulerSupport.NONE)
13509 public final Maybe<T> reduce(@NonNull BiFunction<T, T, T> reducer) {
13510 Objects.requireNonNull(reducer, "reducer is null");
13511 return RxJavaPlugins.onAssembly(new FlowableReduceMaybe<>(this, reducer));
13512 }
13513
13514 /**
13515 * Returns a {@link Single} that applies a specified accumulator function to the first item emitted by the current

Callers 3

setupMethod · 0.45
applyMethod · 0.45
setupMethod · 0.45

Calls 1

onAssemblyMethod · 0.95

Tested by

no test coverage detected