Created
July 9, 2018 09:29
-
-
Save sajjadyousefnia/a742d2b7be22679e0d833ea31c221d7c 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
public inline fun <R> run(block: () -> R): R { | |
contract { | |
callsInPlace(block, InvocationKind.EXACTLY_ONCE) | |
} | |
return block() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment