OSDN Git Service

Regular updates
authorErik <erikgronwal@users.osdn.me>
Wed, 5 Oct 2022 14:55:06 +0000 (23:55 +0900)
committerErik <erikgronwal@users.osdn.me>
Wed, 5 Oct 2022 14:55:06 +0000 (23:55 +0900)
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).