@override B foldLeftWithIndex<B>(B z, B f(B previous, int i, A a)) => foldLeft<Tuple2<B, int>>(tuple2(z, 0), (t, a) => tuple2(f(t.value1, t.value2, a), t.value2+1)).value1;