mirror of
https://github.com/krawieck/lemmur/
synced 2024-12-16 18:39:21 +01:00
7 lines
149 B
Dart
7 lines
149 B
Dart
extension ExtraIterators<E> on Iterable<E> {
|
|
Iterable<T> mapWithIndex<T>(T f(E e, int i)) {
|
|
var i = 0;
|
|
return map((e) => f(e, i++));
|
|
}
|
|
}
|