From fac4d1e60b67993d3624d207bc5d5796b2a24543 Mon Sep 17 00:00:00 2001 From: Ellie Tam Date: Tue, 4 Oct 2022 22:27:04 -0400 Subject: [PATCH] Update kotlin.md (#1885) --- kotlin.md | 1 + 1 file changed, 1 insertion(+) diff --git a/kotlin.md b/kotlin.md index 36638449a..91bbc6528 100644 --- 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).