@voddan - they are different thing,. To be complete you have 3 related constructs
1. extension function
private fun Int.Companion.sum(i: Int, i1: Int) = i + i1
Int.sum(1,2)
2. Function (literal) with reciever
val sum = fun Int.(other:Int) = this + other
sum(1,2)
3. lambda with reciever
inline fun buildString(builderAction: StringBuilder.() -> Unit)
buildString {
append("A")
append("B")
}
//Notice that inside buildString reciever type is StringBuilder, so you can call all it's methods