Purely Functional Data Structures & Algorithms : Union-Find (Haskell)