I have a list defined in one part of my program as
people([tom,betty,sue,fred,charles,chay])
I would like to constraint a variable to be N values in this domain. Something like :
setup(GroupCount) :-
length(Group, GroupCount),
people(X),
Group :: X,
all_different(Group),
<other predicates>.
Currently, Prolog complains "calling undefined procedure Group :: [....] in eclipse. Abort"
I have looked through the SWI-Prolog documentation for lib(clpfd) and lib(lists), and elsewhere, but cannot find a suitable way to do so. Any clues?