Is there a standard fun that return self when non-...
# announcements
s
Is there a standard fun that return self when non-null or using the default? for example:
Copy code
val a: Int? = null
a.foo { 0 } // 0

val b: Int? = 1
b.foo { 0 } // 1
s
Isnt it just the
?:
operator?
b ?: 0
🙌 1
n
and in a call chain
.map { it ?: 0 }