Created
September 16, 2022 05:41
-
-
Save s1monw1/7755fa494f3f26f7483cdb4d5271b89c 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
// return receiver T | |
fun T.also(block: (T) -> Unit): T //T exposed as it | |
fun T.apply(block: T.() -> Unit): T //T exposed as this | |
// return arbitrary value R | |
fun <T, R> T.let(block: (T) -> R): R //T exposed as it | |
fun <T, R> T.run(block: T.() -> R): R //T exposed as this | |
// return arbitrary value R, not an extension function | |
fun <T, R> with(receiver: T, block: T.() -> R): R //T exposed as this |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment