Last active
July 28, 2020 00:57
-
-
Save cioccarellia/257605d476f61c8268e101c1edc38052 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 argument and returns its result. | |
*/ | |
public inline fun <T, R> T.let(block: (T) -> R): R { | |
return block(this) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment