splitBetweenIndexed method

Coral<List<List<E>>> splitBetweenIndexed(
  1. bool test(
    1. int index,
    2. E first,
    3. E second
    )
)

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

Implementation

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