Lambdas in Kotlin
Lambdas are nothing but anonymous functions; a function without a name, meaning they are function defined without fun keyword and we are allowed to assign them to variables or pass them as functional parameters. In Kotlin we define a lambda as follows: var lambda1 = { name: String -> println('Hello, my name is $name') } In above example name is the input parameter to our lambda function and the statement after -> is body of our lambda function and we have assigned the lambda to lambda1 variable....