
get_domain_as_list(?Var, -DomainList)

   List of all the elements in the GFD domain of Var

Arguments
   Var                 A domain variable or a number 
   DomainList          The domain of Var as a list of elements.

Type
   library(gfd)

Description

   If Var is a GFD domain variable, DomainList will be set to an ordered
   list containing each element in the domain of Var.  If Var is a number,
   then DomainList will be set to a singleton list containing the number.


Modes and Determinism
   get_domain_as_list(?, -) is det

Fail Conditions
   The initial value of DomainList fails to unify with the returned value.

Exceptions
     5 --- Var is neither a GFD variable or integer.

Examples
   
 [eclipse 9]: X :: [1..5,10], get_domain_as_list(X, D).

X = X{[1 .. 5, 10]}
D = [1, 2, 3, 4, 5, 10]



See Also
   get_domain / 2, get_bounds / 3
