Does anyone know if there’s a means of casting a l...
# getting-started
d
Does anyone know if there’s a means of casting a lambda to an infix function? ie.
Copy code
val pi: Int.(Int) -> Int = Int::plus
    val resi = 1 pi 2 //fails: infix modifier required on 'invoke' in 'kotlin.Function2'
    val resi2 = 1.pi(2) //success