with

inline fun <T, R> with(receiver: T, block: T.() -> R): R(source)

Calls the specified function block with the given receiver as its receiver and returns its result.

For detailed usage information see the documentation for scope functions.

Since Kotlin

1.0