mapNotNull<R> method
Returns a list containing the results of applying the given transform
function
to each element in the original collection.
Implementation
@useResult
KtList<R> mapNotNull<R>(R? Function(T) transform) {
final destination = mutableListOf<R>();
for (final item in iter) {
final result = transform(item);
if (result != null) {
destination.add(result);
}
}
return destination;
}