also

Calls the specified function block with this value as its argument and returns this value.

@IgnorableReturnValueinline fun <T> T.also(block: (T) -> Unit): T(source)
val greeting = "Hello".also { println("Original value: $it") }
    .uppercase()
    .also { println("Modified value: $it") }

println("Final result: $greeting")  // Outputs: FINAL RESULT: HELLO

Source