Kotlin's 5 scope functions differ in only two ways: 1) how they reference the object (this vs it), and 2) what they return (the object itself vs the lambda result):
let(it, returns lambda result) |also(it, returns object)apply(this, returns object) |run&with(this, returns lambda result)
ADVERTISEMENT