Answers for "kotlin arrow function"

1

kotlin arrow function

//when expressions where it separates "matching/condition" part from "result/execution" block
val greet = when(args[0]) {
   "Apple", "Orange" -> "fruit"
   is Number -> "How many?"
   else    -> "hi!"
 }
Posted by: Guest on August-12-2021

Browse Popular Code Answers by Language