Does anyone know if lambdas can have extension functions? By the looks of it I assume not but I'm not sure why they shouldn't.
r
rtsketo
07/09/2022, 10:22 AM
Copy code
val giefString: () -> String = { "a lambda" }
fun (() -> String).pew() =
println("I have ${ invoke() } as a receiver :o")
fun main() { giefString.pew() }
❤️ 5
i
imashnake_
07/09/2022, 10:29 AM
Nice! I was apparently using the syntax wrong. Thanks!