splitAfterIndexed method

Coral<List<List<E>>> splitAfterIndexed(
  1. bool test(
    1. int index,
    2. E element
    )
)

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

Implementation

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