Ink
enum class ItemCategory { ACCOUNT, CARD, OTHER, INVESTMENTS, LOAN }
items = itemList.sortedBy { it.category.name }.groupBy { it.category }
Artur Schwarz
ephemient
val comparator = compareBy<ItemCategory> { it == ItemCategory.OTHER } .thenBy { it.name } items = itemList.groupBy { it.category } .toSortedMap(comparator)
A modern programming language that makes developers happier.