Skip to content

Instantly share code, notes, and snippets.

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