Created
July 28, 2020 02:09
-
-
Save cioccarellia/5626043a4001c1f46bf2d810bddb30b3 to your computer and use it in GitHub Desktop.
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
/** | |
* Calls the specified function [block] with `this` value as its receiver and returns `this` value. | |
*/ | |
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