flatten<R> method
Flattens a list of iterables by concatenating the values in iteration order.
If this list contains only instances of Iterable<R> the new list will be created correctly, otherwise an exception is thrown.
The iterables are iterated over and must therefore not change during the iteration.
Implementation
ImmortalList<R> flatten<R>() => cast<Iterable<R>>().expand<R>(identity);