or return a function fun calculate(x: Int, y: Int, formula: (Int, Int) -> Int) {
println("the result is ${formula(x, y)}") } // usage
fun main(args: Array<String>) {
calculate(1,5,sum)
calculate(1,5, { x, y -> x + y }) calculate(1,5){ x, y -> x + y }
calculate(1,5,fun(x: Int, y: Int): Int = x + y )
}