
4 Jun
2011
4 Jun
'11
3:37 a.m.
Weird request: For a certain application, the "nub" function from Data.List is exactly what I need... almost. Nub removes duplicates, keeping the /first/ occurrence of each element. However, I need a function that removes duplicates, keeping the /second/ occurrence of each element. There wouldn't happen to be a function already that does this, would there? I'm working with a custom type which is a member of Eq, but some of the data in the type is not used in the comparison. So it is important which of the two "duplicates" are actually saved. -- frigidcode.com theologia.indicium.us