kotlin 之单表达式函数

   fun d(x:Int):Int=x*2

如果函数体只有一条语句,而且是return语句,那么可以省略大括号以及return关键字,

原文地址:https://www.cnblogs.com/loaderman/p/10143944.html