id/email
password
forgot password | create account
about | help | prefs
ReadingBatcode reading practice

 

 

StringsLambdaReturn1

prev  |  next  |  chance

fun lambdaReturn1(word: String): () -> String = { word + word }

Function Call  Return Value
lambdaReturn1("hello").invoke()
lambdaReturn1("hi")()
{ lambdaReturn1("there")() }.invoke()
{ lambdaReturn1("world").invoke() }()

Experiment with this code on Gitpod.io or as a Kotlin Playground

⬅ Back