What do you want to save?
Add Code snippet
New code examples in category Kotlin
-
-
-
-
Rubixphys12 2022-02-05 17:40:31
kotlin function literal
val add: (Int, Int) -> Int = { i, j -> i + j } // Simple lambda expression val printAndDouble: (Int) -> Int = { println(it) // When single parameter, we can reference it using `it` it * 2 // In lambda, last expression is returned } // Anonymou... Add solution
Best helpers
Tushar Diwan
+5
Pinakin
+5
I-love-php
+5
Sinow
+5
Saforrest
+5
Mastersulm
+5
Adam Clowes
+5
RiCo
+5
Any Mouse
+5
Richard D
+5