Did you know ... Search Documentation:
setof.pl
PublicShow source
Source excess_vars(+Term, +ExistVarTerm, +AddVarList, -VarList)
Returns in VarList the list of (free) variables found in Term concatenated to the end of AddVarList. (In normal usage AddVarList is passed in as an empty list.) ExistVarTerm is a term containing variables assumed to be quantified in Term so none of these variables are returned in the resulting list (unless they are in AddVarList.) Subterms of Term of the form (VarTerm^SubTerm) are treated specially: all variables in VarTerm are assumed to be quantified in SubTerm, and so no occurrence of these variables in SubTerm is collected into the resulting list.