It just runs the code :slightly_smiling_face: So, ...
# random
m
It just runs the code 🙂 So,
obj.let { it.action() }
if equivalent to
obj.action()
. In
obj?.let { … }
the
obj
is nullable, and
it
is nun-null so it comes very handy when you need to acces a nullable variable’s value several times when it is non-null. This is the definition of `let`:
public inline fun <T, R> T.let(block: (T) -> R): R = block(this)