?- local domain(weekday(mo,tu,we,th,fr,sa,su)).
declares a domain with name 'weekday' and values 'mo', 'tu' etc. The
domain values are implicitly ordered, with 'mo' corresponding to 1,
until 'su' corresponding to 7. Domain values must be unique within
one ECLiPSe module, i.e. a symbolic value can belong to at most one
domain.
?- X &:: weekday.
X = X{[mo, tu, we, th, fr, sa, su]}
Yes (0.00s cpu)
or multiple variables using
?- [X,Y,Z] &:: weekday.
X = X{[mo, tu, we, th, fr, sa, su]}
Y = Y{[mo, tu, we, th, fr, sa, su]}
Z = Z{[mo, tu, we, th, fr, sa, su]}
Yes (0.00s cpu)