Previous Up Next

10.5  Search Support

The insetdomain/4 predicate can be used to enumerate all ground instantiations of a set variable, much like indomain/1 in the finite domain case. Here is an example of the default enumeration strategy:
?-  X::[]..[1,2,3], insetdomain(X,_,_,_), writeln(X), fail.
[1, 2, 3]
[1, 2]
[1, 3]
[1]
[2, 3]
[2]
[3]
[]
Other enumeration strategies can be selected (see the Reference Manual on insetdomain/4).


Previous Up Next