CompactMap<T> extension

on

Methods

compactMap<E>(E? f(T element)) List<E>

Available on List<T>, provided by the CompactMap extension

Maps each element of the list using the provided function f and returns a new list containing only the non-null results.