Competitive Programming in Haskell: Union-Find
You're viewing a single thread.
Also, I think the 'find' operation could be replaced by an operation that checks if two elements are in the same set. That way you don't have to come up with a "name".