reduce<C extends Object, O extends Object> method

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

Reduces the current Pod and other into a single ChildPod.

Implementation

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