splitBeforeIndexed method

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

Implementation

Coral<List<List<E>>> splitBeforeIndexed(
        bool Function(int index, E element) test) =>
    coral.map((source) => List<List<E>>.unmodifiable(
          source.splitBeforeIndexed(test).map((s) => List<E>.unmodifiable(s)),
        ));