foldIndexed<T> method

Bloom<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.

  • initialValue: Initial accumulator value.
  • combine: Indexed folder function combining the accumulator and current element.

Implementation

Bloom<T> foldIndexed<T>(T initialValue,
        T Function(int index, T previous, E element) combine) =>
    computed((via) => via(bloom).foldIndexed<T>(initialValue, combine));