Is there a straight-forward combination of standard higher-order functions to count the unique elements in a list?
For example the result for
[1, 1,
What your talking about is just run length encoding on sorted data: the free online book Real World Haskell has a great example of this. You will want to sort the list before you put it through the runLengthEncoder.