vars/2

Names and returns a list of variables in a term

vars(Term,Vars) -(i,o)

Compatibility: LPA WIn-Prolog (but with an improvement: The names of the variables are the real names, used originally in the Term).

Remarks: This binds Vars to a list containing all the variables in the given Term, complete with the correct original names. Each element of the list is a conjunction of (<atom>,<variable>), containing the chosen variable-name and variable respectively.