Created
June 20, 2017 00:08
-
-
Save sys1yagi/4e84883c452ad063945a74db1a5e8b12 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
public inline fun <T, R> T.nullWithBlock(block: T.() -> Unit): R? = run { | |
block() | |
null | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment