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

 

 

Lambda IntroIntLambda2

prev  |  next  |  chance

val doubleIt2: (Int) -> Int = { i: Int -> i * 2 }

fun func2a(i: Int): Int = doubleIt2.invoke(i)

fun func2b(i: Int): Int = doubleIt2(i)

Function Call  Return Value
func2a(5)  
func2a(10)
func2b(20)
func2b(25)

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

⬅ Back