Last active
May 17, 2020 16:05
-
-
Save AravinthVelusamy/bf7c0a96d4568df732fb7735b0dae9a2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Find the first league of each set and return pairs of | |
| * index to league name. Assumes that clubs are sorted by ascending league name. | |
| */ | |
| fun indexAgendaHeaders(agendaItems: List<ClubEntity>): List<Pair<Int, String>> { | |
| return agendaItems | |
| .mapIndexed { index, block -> index to block.clubLeague } | |
| .distinctBy { it.second } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment