I'm a Kotlin beginner, eager to know about the behaviour of the lambda expression for println.unfortunately both functions are doing same job.
val printFunction1:(String) -> Unit = {
println("Hello, $it!")
}
val printFunction2 = {
user: String ->
println("Hello, $user!")
}
I can call the functions like this, It would be good if someone can explain this.
printFunction1("Bini")
printFunction2("Jenu")