
inline fun <T, R> isNullObject(value: T?, notNullBlock: (T) -> R, isNullBlock: (() -> Unit)? = null) {
if (value != null) {
notNullBlock(value)
} else {
if(isNullBlock != null){
isNullBlock()
}
}
Run Code Online (Sandbox Code Playgroud)
}
尝试写一些高阶函数方便开发,但是报错