softMap<R> method

Iterable<R> softMap<R>(
  1. R? f(
    1. T
    )
)

Returns a new Iterable with mapped elements that are not null.

Implementation

Iterable<R> softMap<R>(R? Function(T) f) sync* {
  for (var e in this) {
    R? r = f(e);
    if (r != null) {
      yield r;
    }
  }
}