bernhard
02/14/2017, 5:09 PMinline fun <T, R> T?.let(block: (T) -> R, elseValue: R): R {
return if (this != null) block(this) else elseValue
}
inline fun <T, R> T?.let(block: (T) -> R, elseBlock: () -> R): R {
return if (this != null) block(this) else elseBlock()
}
but the syntax to use is still not very nice...