Skip to content

Commit

Permalink
Merge pull request #158 from jetbrains-academy/stephen-hero-patch-14
Browse files Browse the repository at this point in the history
Update task.md
  • Loading branch information
nbirillo authored Dec 25, 2023
2 parents 00aebe1 + ecc5baa commit 856cd1a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions codenamesServer/codenamesServerUtilsPartTwo/task.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ If you have any difficulties, **hints will help you solve this task**.

### Hints

<div class="hint" title="Click me to learn about empty mutable list initialization">
<div class="hint" title="Click me to learn about initializing an empty mutable list">

To initialize the `previousAttempts` field, you need to create a new empty mutable list:
```kotlin
Expand All @@ -32,7 +32,7 @@ object Utils {
```
</div>

<div class="hint" title="Click me to learn about function definition of the SAM interfaces">
<div class="hint" title="Click me to learn about defining a function for SAM interfaces">

It is better to use a function definition for SAM interfaces:
```kotlin
Expand Down Expand Up @@ -63,7 +63,7 @@ fun main() {
```
</div>

<div class="hint" title="Click me to learn about the map built-in function">
<div class="hint" title="Click me to learn about the `map` built-in function">

You are already familiar with several built-in functions for lists.
It's time to get acquainted with the built-in [`map`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/map.html) function.
Expand Down Expand Up @@ -106,7 +106,7 @@ fun main() {
```
</div>

<div class="hint" title="Click me to learn how to flat a list of lists into one list">
<div class="hint" title="Click me to learn how to flatten a list of lists into a single list">

Consider a situation where we have a list of lists, for example, `List<List<KeyCardType>>`,
and we need to get a list consisting of all the elements of all lists of the original list:
Expand Down Expand Up @@ -135,7 +135,7 @@ fun main() {
}
```

But Kotlin has a built-in function [`flatten`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/flatten.html) to do the same:
However, Kotlin has a built-in function [`flatten`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/flatten.html) to do the same:
```kotlin
fun main() {
val initialList = listOf(
Expand Down

0 comments on commit 856cd1a

Please sign in to comment.