📜  kotlin 函数类型 - Kotlin 代码示例

📅  最后修改于: 2022-03-11 14:53:33.249000             🧑  作者: Mango

代码示例1
Function types
()->Unit - takes no arguments and returns nothing (Unit).
(Int, Int)->Int - takes two arguments of type Int
and returns Int.
(()->Unit)->Int - takes another function
and returns Int.
(Int)->()->Unit - takes argument of type Int
and returns function.