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

[;1m  partition(SetFun, Set)[0m

  Returns the partition of [;;4mSet[0m such that two elements are
  considered equal if the results of applying [;;4mSetFun[0m are equal.

[;1mExamples[0m

    1> Ss = sofs:from_term([[a],[b],[c,d],[e,f]]).
    2> SetFun = fun(S) -> sofs:from_term(sofs:no_elements(S)) end.
    3> P = sofs:partition(SetFun, Ss).
    4> sofs:to_external(P).
    [[[a],[b]],[[c,d],[e,f]]]
