Re: why does this not work

Gergö Barany <[email protected]>
Newsgroups gmane.comp.ai.prolog.swi
Message-ID <[email protected]>
On Tue, Mar 25, 2014 at 14:32:03 +0000, Roelof Wobben wrote:
> % Displays the output of siblings(X,Y) and takes care that 
> % there are no duplicates.
> display_siblings(Person) :-
>       findall(Person-Y, (siblings(Person,Y),Person @< Y), Sibs),
>        display_the_siblings(Sibs).
> [...]
> But when I do display_siblings(kimberly) I see a message Er zijn geen zussen/broers bekend
> That's wrong Denise is a sibling of Kimberly.

?- Person = kimberly, findall(Person-Y, (siblings(Person,Y),Person @< Y), Sibs).
Person = kimberly,
Sibs = [].

?- Person = kimberly, findall(Person-Y, (siblings(Person,Y)), Sibs).
Person = kimberly,
Sibs = [kimberly-denise].

-- 
Gergö Barany, research assistant                 [email protected]
Institute of Computer Languages      http://www.complang.tuwien.ac.at/gergo/
Vienna University of Technology                       Tel: +43-1-58801-58522
Argentinierstrasse 8/E185, 1040 Wien, Austria         Fax: +43-1-58801-18598
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.