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

 

 

StringsLambdaReturn1

fun lambdaReturn1(word: String): () -> String = { word + word } fun main() { println(lambdaReturn1("hello").invoke()) println(lambdaReturn1("hi")()) println({ lambdaReturn1("there")() }.invoke()) println({ lambdaReturn1("world").invoke() }()) }

Click on to run the code

⬅ Back