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

 

 

StringsLambdaReturn2

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

Click on to run the code

⬅ Back