OSDN Git Service

Regular updates
[twpd/master.git] / kotlin.md
index 3663844..91bbc65 100644 (file)
--- a/kotlin.md
+++ b/kotlin.md
@@ -169,6 +169,7 @@ val containsNoEvens = numList.none { it % 2 == 0 }
 val containsNoEvens = numList.all { it % 2 == 1 }
 val firstEvenNumber: Int = numList.first { it % 2 == 0 }
 val firstEvenOrNull: Int? = numList.firstOrNull { it % 2 == 0 }
+val fullMenu = objList.map { "${it.name} - $${it.detail}" }
 ```
 
 Note: `it` is the [implicit name for a single parameter](https://kotlinlang.org/docs/reference/lambdas.html#it-implicit-name-of-a-single-parameter).