I have 400 players with 4 skills I want to group t...
# android
z
I have 400 players with 4 skills I want to group them by skill but take only 20 from each skill
Copy code
players.groupBy {
    it.skill
}
Copy code
playersInBudget.groupBy {
    it.skill
}.takeIf {
    it.size <= 20
}
I this correct