6 lines
209 B
Text
6 lines
209 B
Text
inline fun higherOrderFunction(x: Int, y: Int, function: (Int, Int) -> Int) = function(x, y)
|
|
|
|
fun main(args: Array<String>) {
|
|
val result = higherOrderFunction(3, 5) { x, y -> x + y }
|
|
println(result)
|
|
}
|