next up previous
Next: Constructing Recursive Data Structures Up: Adding Computation Domains: CLP Previous: Constructing Data Structures

Constructing Data Structures

  $\mbox{$\bullet$}$
Some couples go out for dinner if...
go_out_for_dinner(Ma, Mb):-
married(Ma),
married(Mb),
spouse(Ma, A),
spouse(Mb, B),
are_friends(A, B).
?- go_out_for_dinner(A, B).
A=couple(peter,anna), B=couple(mark,kathleen) ; A=couple(peter,anna), B=couple(alvin,marcia) ; A=couple(mark,kathleen), B=couple(peter,anna) ; A=couple(alvin,marcia), B=couple(peter,anna)



Last modification: Thu Oct 7 12:04:03 MEST 1999 <webmaster@clip.dia.fi.upm.es>