
13 Mar
2007
13 Mar
'07
5:24 a.m.
Neil Mitchell schrieb: [...]
sortNub = map head . group . sort
sortNub = Data.Set.toList . Data.Set.fromList
This is O(n log n) [time to sort], rather than O(n^2) [time to nub]. [...]
I personally have defined this function at least 25 times, I suspect others have to.
Maybe you should have switched from lists to sets anyway. Cheers Christian