sandbox/lpn/ch03/matroshka.pl

8 lines
166 B
Prolog

directlyIn(natasha, irina).
directlyIn(olga, natasha).
directlyIn(katarina, olga).
in(X, Y) :- directlyIn(X, Y).
in(X, Y) :- directlyIn(X, Z),
in(Z, Y).