compactMap<T> method

Iterable<T> compactMap<T>(
  1. T? f(
    1. E
    )
)

Implementation

Iterable<T> compactMap<T>(T? Function(E) f) sync* {
  for (final e in this) {
    final te = f(e);
    if (te != null) yield te;
  }
}