%% %CopyrightBegin%
%%
%% SPDX-License-Identifier: Apache-2.0
%%
%% Copyright Ericsson AB 2021-2025. All Rights Reserved.
%%
%% %CopyrightEnd%

[;1m  partition(SetOfSets)[0m

  Returns the partition of the union of the set of sets [;;4mSetOfSets[0m
  such that two elements are considered equal if they belong to the
  same elements of [;;4mSetOfSets[0m.

[;1mExamples[0m

    1> Sets1 = sofs:from_term([[a,b,c],[d,e,f],[g,h,i]]).
    2> Sets2 = sofs:from_term([[b,c,d],[e,f,g],[h,i,j]]).
    3> P = sofs:partition(sofs:union(Sets1, Sets2)).
    4> sofs:to_external(P).
    [[a],[b,c],[d],[e,f],[g],[h,i],[j]]
