Re: where do I think wrong
Kilian Evang <[email protected]>
| Newsgroups | gmane.comp.ai.prolog.swi |
|---|---|
| Message-ID | <[email protected]> |
On 13-03-14 09:04, Roelof Wobben wrote: > have_siblings(C) :- > is_father(X,C), > is_father(X,S); > is_mother(Y,S), > is_mother(Y,C), > C \= S, > write(S). > > So if a father of a child(C) is equal to the father of a sibling(S) or the mother of a child is equal to the mother of a sibling. > But nothing gets found then. The scope of your "or" is wrong. a,b;c,d,e,f is equivalent to (a,b);(c,d,e,f), but I think you need (a,b;c,d),e,f.