mirror of
https://github.com/dancojocaru2000/logic-circuits-simulator.git
synced 2025-02-22 17:19:36 +02:00
6 lines
No EOL
171 B
Dart
6 lines
No EOL
171 B
Dart
extension IndexedMap<T> on Iterable<T> {
|
|
Iterable<O> indexedMap<O>(O Function(int, T) toElement) {
|
|
int index = 0;
|
|
return map((e) => toElement(index++, e));
|
|
}
|
|
} |