Skip to content

Commit

Permalink
Merge pull request #45 from jetbrains-academy/stephen-hero-patch-4
Browse files Browse the repository at this point in the history
Update task.md
  • Loading branch information
nbirillo authored Dec 9, 2023
2 parents 7bc798e + 268771c commit d9d9f1a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions oldSchoolServer/oldSchoolServerGroupByByHairAndHat/task.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Another exercise about the `groupBy` function.
Here's another exercise with the `groupBy` function.
Implement the `groupPhotosByHairAndHat` function from the `GameFunctionsService` class.
This function should group photos by hair type,
This function should group photos by the hair type,
then group photos by the presence of hats in each hair type group,
and then return the flat list of the flattened list of all grouped photos, e.g.:
and then return the flattened list of all grouped photos, e.g.:
```kotlin
fun main() {
val photos = listOf(
Expand Down Expand Up @@ -35,6 +35,6 @@ fun main() {

You can use the already implemented function `toPhotoCharacters` to implement the `groupPhotosByHairAndHat` function.

After implementing this task, you will be able to group photos by hair type and hat presence and reorder their on the album:
After implementing this task, you will be able to group photos by the hair type and hat presence and reorder them in the album:

![Current state](../../utils/src/main/resources/images/old/school/states/state_4.gif)

0 comments on commit d9d9f1a

Please sign in to comment.