Functions
Characteristic
Declaration
// Without return type
fun save() { }
// is implicitly equals to
fun save(): Unit { }
// With return type
fun add(x: Int, y: Int): Int {
return x + y
}Default arguments
Named arguments
Types of functions
Generic functions
Higher Order Function
Extension functions
Infix functions
Last updated
Was this helpful?