An immutable Union-Find data structure implementation in Scala