Skip to content

Commit 80517e2

Browse files
yanxiaosengp7nov
andauthored
chore: better descriptions in 07_firstlast.md (Kotlin#174)
* Update 07_firstlast.md * Update 07_firstlast.md Co-authored-by: Pavel Semyonov <[email protected]>
1 parent a8935f2 commit 80517e2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

examples/05_Collections/07_firstlast.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ fun main() {
5050
val lastZ = words.lastOrNull { it.endsWith('z') } // 8
5151
//sampleEnd
5252
53-
println("First $first, last $last")
54-
println("First starts with 'f' is $firstF, last starts with 'z' is $firstZ")
55-
println("First ends with 'f' is $lastF, last ends with 'z' is $lastZ")
53+
println("Empty list: first is $first, last is $last")
54+
println("Word list: first item starting with 'f' is $firstF, first item starting with 'z' is $firstZ")
55+
println("Word list: last item ending with 'f' is $lastF, last item ending with 'z' is $lastZ")
5656
}
5757
```
5858

0 commit comments

Comments
 (0)