mapNotNull<V> method

Iterable<V> mapNotNull<V>(
  1. V? mapper(
    1. T
    )
)

Maps an Iterable (like map), but filters out any null values and cast the resulting Iterable to be null-safe.

Implementation

Iterable<V> mapNotNull<V>(V? Function(T) mapper) {
  return map(mapper).filterNotNull();
}