Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- left(a,b).
- left(c,i).
- left(i,j).
- right(k,j).
- line1:a,b line2: c,i,j,k.
- nextto(X,Y):- left(X,Y);left(Y,X);right(X,Y);right(Y,X).
- sameline(X,Y):- nextto(X,Y).
- sameline(X,Y):- nextto(X,Z),sameline(Z,Y).
- ?- sameline(a,c)
- ancestor(X,Y) :- parent(X,Y).
- ancestor(X,Y) :- parent(X,Z),ancestor(Z,Y).
Add Comment
Please, Sign In to add comment