
  -spec restriction(SetFun, Set1, Set2) -> Set3
                       when
                           SetFun :: set_fun(),
                           Set1 :: a_set(),
                           Set2 :: a_set(),
                           Set3 :: a_set().

  Returns a subset of Set1 containing those elements that gives an
  element in Set2 as the result of applying SetFun.

    1> S1 = sofs:relation([{1,a},{2,b},{3,c}]),
    S2 = sofs:set([b,c,d]),
    S3 = sofs:restriction(2, S1, S2),
    sofs:to_external(S3).
    [{2,b},{3,c}]
