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

 

 

StringsLambdaReturn2

prev  |  next  |  chance

fun lambdaReturn2(word: String): () -> Int = { word.length }

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

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

⬅ Back