Last active
May 17, 2020 16:05
-
-
Save AravinthVelusamy/bf7c0a96d4568df732fb7735b0dae9a2 to your computer and use it in GitHub Desktop.
Revisions
-
Aravinth Velusamy revised this gist
May 17, 2020 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ /** * 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 -
Aravinth Velusamy created this gist
May 17, 2020 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,9 @@ /** * Find the first block of each day (rounded down to nearest day) and return pairs of * index to start time. Assumes that [agendaItems] are sorted by ascending start time. */ fun indexAgendaHeaders(agendaItems: List<ClubEntity>): List<Pair<Int, String>> { return agendaItems .mapIndexed { index, block -> index to block.clubLeague } .distinctBy { it.second } }