chickadee » disjoint-set » disjoint-set-set!

disjoint-set-set! ds xi xprocedure

Sets the element of index xi to x, and returns the ds

It is an error if (> xi nelems), with nelems the number of elements of the Universe set of ds.

Use with care! It is an error to use this procedure in such a way that the mutated ds object has fewer subsets than the original ds object without also updating the size field with disjoint-set-size-set!.