Instantly share code, notes, and snippets.

Embed
What would you like to do?
public inline fun <T> T.apply(block: T.() -> Unit): T {
contract {
callsInPlace(block, InvocationKind.EXACTLY_ONCE)
}
block()
return this
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment