foldLeftWithIndex<C> method

C foldLeftWithIndex<C>(
  1. C c,
  2. C f(
    1. int i,
    2. C acc,
    3. B b
    )
)

Implementation

C foldLeftWithIndex<C>(C c, C Function(int i, C acc, B b) f) =>
    foldLeft<(C, int)>(
      (c, 0),
      (t, b) => (f(t.$2, t.$1, b), t.$2 + 1),
    ).$1;