val constVal: () -> Int = { 4 } fun funcNoArg2(i: Int): Int = i * constVal.invoke()
Experiment with this code on Gitpod.io or as a Kotlin Playground
⬅ Back