foldRightWithIndex<C> method
- C c,
- C f(
- int i,
- C acc,
- R b
override
Return the result of f
called with b
and the value of Right.
If this Either is Left, return b
.
Implementation
@override
C foldRightWithIndex<C>(C c, C Function(int i, C acc, R b) f) =>
foldRight<Tuple2<C, int>>(
Tuple2(c, length() - 1),
(t, b) => Tuple2(f(t.second, t.first, b), t.second - 1),
).first;