how can I easily get a (sorted) frequency map of a...
# announcements
a
how can I easily get a (sorted) frequency map of a LongArray? is there something neater than
longArray.toList().groupingBy{ it }.eachCountTo(sortedMapOf())
?
i
You can use
asList
instead of
toList
, but otherwise it's pretty neat.