flatMap<R> method

Iterable<R> flatMap<R>(
  1. Iterable<R> f(
    1. T
    )
)

Maps each element to an Iterable and flattens the result.

['hello', 'world'].flatMap((s) => s.split(''))
// ['h','e','l','l','o','w','o','r','l','d']

Implementation

Iterable<R> flatMap<R>(Iterable<R> Function(T) f) => expand(f);