expandIndexed<R> method
Returns a new list expanding each element of this list into a list of zero
or more elements by applying f
to each element and its respective index
and concatenating the resulting lists.
See expand.
Implementation
ImmortalList<R> expandIndexed<R>(
Iterable<R> Function(int index, T value) f,
) =>
mapIndexed(f).expand(identity);