
  -spec partition(SetFun, Set1, Set2) -> {Set3, Set4}
                     when
                         SetFun :: set_fun(),
                         Set1 :: a_set(),
                         Set2 :: a_set(),
                         Set3 :: a_set(),
                         Set4 :: a_set().

  Returns a pair of sets that, regarded as constituting a set, forms
  a partition of Set1. If the result of applying SetFun to an
  element of Set1 gives an element in Set2, the element belongs
  to Set3, otherwise the element belongs to Set4.

    1> R1 = sofs:relation([{1,a},{2,b},{3,c}]),
    S = sofs:set([2,4,6]),
    {R2,R3} = sofs:partition(1, R1, S),
    {sofs:to_external(R2),sofs:to_external(R3)}.
    {[{2,b}],[{1,a},{3,c}]}

  partition(F, S1, S2) is equivalent to {restriction(F, S1, S2),
  drestriction(F, S1, S2)}.
