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

[;1m  intersection(SetOfSets)[0m

  Returns the intersection of the set of sets [;;4mSetOfSets[0m.

  Intersecting an empty set of sets exits the process with a [;;4mbadarg[0m
  message.

[;1mExamples[0m

    1> S1 = sofs:set([a,b,c]).
    2> S2 = sofs:set([b,c,d,e]).
    3> S3 = sofs:set([a,b,c,d]).
    4> S4 = sofs:from_sets([S1,S2,S3]).
    5> S5 = sofs:intersection(S4).
    6> sofs:to_external(S5).
    [b,c]
    7> S6 = sofs:from_sets([]).
    8> sofs:intersection(S6).
    ** exception error: bad argument
         in function  sofs:intersection/1

[;1m  intersection(Set1, Set2)[0m

  Returns the intersection of [;;4mSet1[0m and [;;4mSet2[0m.

[;1mExamples[0m

    1> S1 = sofs:set([a,b,c]).
    2> S2 = sofs:set([b,c,d]).
    3> S3 = sofs:intersection(S1, S2).
    4> sofs:to_external(S3).
    [b,c]
