mapNotNull<K> method
Maps every item in this iterable using mapper
and
removes any null values emitted by mapper
Implementation
Iterable<K> mapNotNull<K>(K? Function(T) mapper) sync* {
for (final element in this) {
final mapped = mapper(element);
if (mapped != null) {
yield mapped;
}
}
}