Michael Friend
04/18/2025, 5:51 PMcontext(...){ }
scoping function to provide multiple values to the implicit context for calling functions with context params. Is this planned for a future release or has the implementation and plans just diverged from the original KEEP?Youssef Shoaib [MOD]
04/18/2025, 6:20 PMinline fun <A, B, R> context(a: A, b: B, block: context(A, B) () -> R {
contract {
callsInPlace(block, EXACTLY_ONCE)
}
return block(a, b)
}
Youssef Shoaib [MOD]
04/18/2025, 6:22 PMimplicit
is provided in that KEEP as such:
context(ctx: A) fun <A> implicit(): A = ctx