Emil Kantis
07/04/2022, 6:35 PMcontext(MyContext)
fun sayHello(name: String) {
println("Hello $name")
}
fun main() {
with(context) {
listOf("a", "b").forEach(::sayHello)
}
}
Right now it gives an error because sayHello is a KFunction2<MyContext, String,Unit>
when a (TypeVariable(T)) -> Unit
was expected.elizarov
10/20/2022, 7:51 AM