mapNonNull<R> method
Maps each non-null element using the provided mapper
function.
Example:
Iterable<int?>? numbers = [null, 2, 3];
final mapped = numbers.mapNonNull((num) => num * 2);
print(mapped); // Output: [4, 6]
Implementation
Iterable<R> mapNonNull<R>(R Function(T element) mapper) =>
validate().map(mapper);