variables/2

Returns the list of all variables in a term

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

Compatibility: Exclusively G.I.S. Prolog.

Remarks: This binds Vars to a list containing all the variables in the given Term. Each element of the list is unified with each variable present inside the Term.