https://kotlinlang.org logo
k

karelpeeters

10/08/2017, 10:38 AM
Basically,
also
runs the passed lambda and then returns the receiver,
b
in this case. The receiver is evaluated first, so also will return
8
. In the passed lambda, `a`'s value is assigned to
b
, but that doesn't influence the receiver any more because that has already been evaluated.