Skip to content

Commit

Permalink
Update kotlin.md (rstacruz#1885)
Browse files Browse the repository at this point in the history
  • Loading branch information
lovelyingtam committed Oct 5, 2022
1 parent 288baef commit fac4d1e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions kotlin.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down

0 comments on commit fac4d1e

Please sign in to comment.