reduce<C, O> method

ChildPod<dynamic, C> reduce<C, O>(
  1. GenericPod<O> other,
  2. TReducerFn2<C, T, O> reducer
)

Reduces the current Pod and other into a single ChildPod.

Implementation

ChildPod<dynamic, C> reduce<C, O>(
  GenericPod<O> other,
  TReducerFn2<C, T, O> reducer,
) {
  return PodReducer2.reduce<C, T, O>(
    () => (this, other),
    (a, b) => reducer(a!, b!),
  );
}