<Multiple Scope "With" function> fun with( s1...
# forum
r
Multiple Scope "With" function fun with( s1: A, s2: B, s3: C, block: @ContextFunctionTypeParams(count = 3) () -> R ): R = with(s1) { with(s2) { with(s3) { block.invoke() } } } fun somefun() { val lambda: context(String, Int, Boolean) () -> Unit = { TODO() } with( "1", 2, false, lambda ) } to make easy with context receiver. i tried to make this but didn’t work. 1 post - 1...