Skip to content

Instantly share code, notes, and snippets.

@cioccarellia
Last active July 28, 2020 00:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cioccarellia/257605d476f61c8268e101c1edc38052 to your computer and use it in GitHub Desktop.
Save cioccarellia/257605d476f61c8268e101c1edc38052 to your computer and use it in GitHub Desktop.
/**
* 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