Skip to content

Instantly share code, notes, and snippets.

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