run
Calls the specified function block and returns its result.
@IgnorableReturnValueinline fun <R> run(block: () -> R): R(source)
val result = run {
val a = 5
val b = 7
a * b
}
println("Result: $result")
Calls the specified function block and returns its result.
@IgnorableReturnValueinline fun <R> run(block: () -> R): R(source)
val result = run {
val a = 5
val b = 7
a * b
}
println("Result: $result")