Skip to content

homework 2 eartelny#7

Open
eartelny wants to merge 1 commit intoKotlin-Yadro:masterfrom
eartelny:master
Open

homework 2 eartelny#7
eartelny wants to merge 1 commit intoKotlin-Yadro:masterfrom
eartelny:master

Conversation

@eartelny
Copy link

@eartelny eartelny commented Sep 9, 2024

No description provided.

* - Если фамилии совпадают, персоны сортируются по имени в порядке возрастания
*/
fun List<Person>.sortByName(): List<Person> = TODO("Доделать sortBySurname") No newline at end of file
fun List<Person>.sortByName(): List<Person> = sortedBy { it.surname } No newline at end of file
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eartelny , тут нужно добавить второй компаратор - по имени. Вторая часть задания:
Если фамилии совпадают, персоны сортируются по имени в порядке возрастания

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants