foldIndexed<T> method

Coral<T> foldIndexed<T>(
  1. T initialValue,
  2. T combine(
    1. int index,
    2. T previous,
    3. E element
    )
)

Reduces this collection to a single value by iteratively combining elements along with their index and an initial value reactively.

Implementation

Coral<T> foldIndexed<T>(T initialValue,
        T Function(int index, T previous, E element) combine) =>
    coral.map((source) => source.foldIndexed<T>(initialValue, combine));