Iterable<T> mapIsLast<T>(T Function(E e, bool isLast) f) { var i = -1; return map((e) { i++; return f(e, i == (length - 1)); }); }