Skip to content

Lamda Expression

Devrath edited this page Feb 1, 2024 · 6 revisions

Lamda Expression

Both are equal Normal function

fun addTwoNum(x : Int , y :Int) : Int {
    return x+y
}

Using lamda expression: It is a function without a name

{x,y -> x+y }

Clone this wiki locally