修订版 | b63cfcef4f51621244d7acf4c594347cc22d6af6 (tree) |
---|---|
时间 | 2022-10-05 23:55:06 |
作者 | Erik <erikgronwal@user...> |
Commiter | Erik |
Regular updates
@@ -169,6 +169,7 @@ val containsNoEvens = numList.none { it % 2 == 0 } | ||
169 | 169 | val containsNoEvens = numList.all { it % 2 == 1 } |
170 | 170 | val firstEvenNumber: Int = numList.first { it % 2 == 0 } |
171 | 171 | val firstEvenOrNull: Int? = numList.firstOrNull { it % 2 == 0 } |
172 | +val fullMenu = objList.map { "${it.name} - $${it.detail}" } | |
172 | 173 | ``` |
173 | 174 | |
174 | 175 | Note: `it` is the [implicit name for a single parameter](https://kotlinlang.org/docs/reference/lambdas.html#it-implicit-name-of-a-single-parameter). |