☰

*ON THIS PAGE*# Sets of variables in terms

**Author(s):** The Ciao Development Team.## Usage and interface

## Documentation on exports

`varset(Term,Xs)`
`varsbag(Term,Vs,Xs)`
`term_variables(Term,Vars,Tail)`
## Documentation on imports

This module has the following direct dependencies:

This module implements predicates to handle sets of variables in terms.

**Library usage:**`:- use_module(library(terms_vars)).`**Exports:***Predicates:*`varset/2`,`intersect_vars/3`,`member_var/2`,`diff_vars/3`,`varsbag/3`,`varset_in_args/2`,`term_variables/2`,`term_variables/3`.

PREDICATEvarset/2

Xs is the sorted list of all the variables in Term.

PREDICATEintersect_vars/3

No further documentation available for this predicate.

PREDICATEmember_var/2

No further documentation available for this predicate.

PREDICATEdiff_vars/3

No further documentation available for this predicate.

PREDICATEvarsbag/3

Vs is the list of all the variables in Term ordered as they appear in Term right-to-left depth-first (including duplicates) plus Xs.

PREDICATEvarset_in_args/2

Usage:`varset_in_args(T,LL)`

Each list of LL contains the variables of an argument of T, for each argument, and in left to right order.

*The following properties should hold at call time:*

(`term_typing:nonvar/1`)T is currently a term which is not a free variable.*The following properties should hold upon exit:*

(`basic_props:list/2`)LL is a list of list(var)s.

PREDICATEterm_variables/2

Usage:ISO`term_variables(Term,Vars)`

Vars is the list of all the variables in Term, ordered as they appear in Term right-to-left depth-first (without duplicates).

PREDICATEterm_variables/3

Vars-Tail is the difference list of all the variables in Term, ordered as they appear in Term right-to-left depth-first (without duplicates).

*System library modules:*`idlists`,`sort`.*Packages:*`prelude`,`initial`,`condcomp`,`assertions`,`assertions/assertions_basic`.

Generated with LPdoc using Ciao