flatMap<R> method
The flatMap() method first maps each element using a mapping function, then flattens the result into a new array
Implementation
Iterable<R> flatMap<R>(Iterable<R> f(item)) sync* {
for (var item in items) {
yield* f(item);
}
}