splitBeforeIndexed method

Bloom<List<List<E>>> splitBeforeIndexed(
  1. bool test(
    1. int index,
    2. E element
    )
)

Splits this collection into chunks before elements satisfying an indexed predicate test reactively.

  • test: Indexed predicate identifying chunk boundary elements.

Implementation

Bloom<List<List<E>>> splitBeforeIndexed(
        bool Function(int index, E element) test) =>
    computed((via) => List<List<E>>.unmodifiable(
          via(bloom)
              .splitBeforeIndexed(test)
              .map((s) => List<E>.unmodifiable(s)),
        ));