firstNotNullOfOrNull<R> method

R? firstNotNullOfOrNull<R>(
  1. R? transform(
    1. T?
    )
)

Returns the first non-null value after applying the given transform function; null will be returned if there is no such value.

Implementation

R? firstNotNullOfOrNull<R>(R? Function(T?) transform) {
  final KtList<R> mappedList = mapNotNull(transform);
  return mappedList.firstOrNull();
}