
  -spec specification(Fun, Set1) -> Set2
                         when
                             Fun :: spec_fun(),
                             Set1 :: a_set(),
                             Set2 :: a_set().

  Returns the set containing every element of Set1 for which Fun
  returns true. If Fun is a tuple {external, Fun2}, Fun2 is
  applied to the external set of each element, otherwise Fun is
  applied to each element.

    1> R1 = sofs:relation([{a,1},{b,2}]),
    R2 = sofs:relation([{x,1},{x,2},{y,3}]),
    S1 = sofs:from_sets([R1,R2]),
    S2 = sofs:specification(fun sofs:is_a_function/1, S1),
    sofs:to_external(S2).
    [[{a,1},{b,2}]]
