where the block receives `this` … basically want t...
# announcements
b
where the block receives
this
… basically want to be able to provide diff messages to log when something is null or not
Copy code
inline fun <T> T?.someName(nullFunc: () -> Unit, nonNullFunc: () -> Unit): T? {
    return this?.also {
        nonNullFunc()
    } ?: null.also {
        nullFunc()
    }
}