Skip to content

Instantly share code, notes, and snippets.

@sagarpatel288
Created June 5, 2020 02:23
Show Gist options
  • Save sagarpatel288/8f5617d0e1353b88e9a3f3668e2fc603 to your computer and use it in GitHub Desktop.
Save sagarpatel288/8f5617d0e1353b88e9a3f3668e2fc603 to your computer and use it in GitHub Desktop.
The definition of a scope function: with
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