Skip to content

Instantly share code, notes, and snippets.

@sagarpatel288
Created June 5, 2020 03:06
Show Gist options
  • Save sagarpatel288/30fac80a160607592ff2afbb96ccc9f0 to your computer and use it in GitHub Desktop.
Save sagarpatel288/30fac80a160607592ff2afbb96ccc9f0 to your computer and use it in GitHub Desktop.
The definition of a scope function: T.run
public inline fun <T, R> T.run(block: T.() -> R): R {
/*...*/
return block()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment