I feel like this has been asked before, but what's...
# stdlib
k
I feel like this has been asked before, but what's the best way to merge some items in a list. Currently I have
groupBy { it.toMergeOn() }.values.map { it.first() }
but this only works if all mergable items are next to each other