mapNotNull<R> method

Iterable<R> mapNotNull<R>(
  1. R? transform(
    1. T element
    )
)

Implementation

Iterable<R> mapNotNull<R>(R? Function(T element) transform) sync* {
  for (final element in this) {
    final transformed = transform(element);
    if (transformed != null) yield transformed;
  }
}