whenNull

inline fun <T> T.whenNull(block: () -> Unit): T

Calls the specified function block only when this value is null and then returns this value.

Sources

Katlib source
Link copied to clipboard