mapToListIndexed<T> method
Transforms elements to objects of type T
with the transformer f
,
providing sequential index of the element, and appends the result to the given destination
.
Implementation
List<T> mapToListIndexed<T>(List<T> destination, IndexedTransform<E, T> f) {
mapIndexed(f).forEach((e) => destination.add(e));
return destination;
}