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

[;1m  from_sets(AnySet)[0m

  Returns the unordered set containing the sets of list [;;4mListOfSets[0m,
  or returns the ordered set containing the sets of the non-empty
  tuple [;;4mTupleOfSets[0m.

[;1mExamples[0m

  Creating an unordered set.

    1> S1 = sofs:relation([{a,1},{b,2}]).
    2> S2 = sofs:relation([{x,3},{y,4}]).
    3> S = sofs:from_sets([S1,S2]).
    4> sofs:to_external(S).
    [[{a,1},{b,2}],[{x,3},{y,4}]]
    5> sofs:type(S).
    [[{atom,atom}]]

  Creating an ordered set.

    1> S1 = sofs:from_term(a).
    2> S2 = sofs:from_term(b).
    3> S = sofs:from_sets({S1,S2}).
    4> sofs:to_external(S).
    {a,b}
    5> sofs:type(S).
    {atom,atom}
