Created
June 5, 2020 02:23
-
-
Save sagarpatel288/8f5617d0e1353b88e9a3f3668e2fc603 to your computer and use it in GitHub Desktop.
The definition of a scope function: with
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public inline fun <T, R> with(receiver: T, block: T.() -> R): R { | |
/*…*/ | |
return receiver.block() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment