
26 Aug
2008
26 Aug
'08
11:13 a.m.
Hi
The folklore (such as it is) for uniq is that it is trivially defined like so (for lists):
uniq = map head . group . sort
and so perhaps is not worthy of library inclusion? BTW, is this a suitably performant definition, or would we benefit from a lower-level implementation?
A much better definition would use a Data.Set, then you get laziness and the order of elements is not permuted. Having a sortNub as well is a good idea though. Thanks Neil