Has it ever been possible calling an extension fun...
# getting-started
m
Has it ever been possible calling an extension function this way?
Copy code
fun String.myFunction(param: Int) { }

// ...

"receiver".myFunction(5)

// but instead...
myFunction("receiver", 5)
I'm positive I was able to do that from Kotlin.
e
no. but if it were a value
Copy code
myFunction: String.(param: Int) -> Unit
instead (such as a property or function parameter), then
"receiver".myFunction(5)
and
myFunction("receiver", 5)
would be equivalent
đŸ€Ż 1
m
Ah, that was probably what I was thinking about. Thanks.
v
Or you had Groovy in mind. 😄
k
Why is it allowed for lambdas?