[ library(fd) | Reference Manual | Alphabetic Index ]

# labeling(+Vars)

Instantiate all variables in a list to values in their domain

Vars
  List of variables or ground terms.

## Description

This predicate instantiates all variables in a list to values in their domain, using the indomain/1 predicate. It is simply defined as:

            labeling([]).
            labeling([Var|Rest]) :-
                indomain(Var),
                labeling(Rest).

The list can contain ground terms, i.e. variables that are already instantated. These are just skipped, in other words, they are considered as variables with a single value in their domain.

### Resatisfiable

Yes

## See Also

indomain / 1, fd_search : search / 6