Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- find_all_brothers(Z):- findall(X,brother(X,Z),X0),write(X0).
- brother(sam, bill).
- brother(bill, fred).
- find_all_brothers(Z) :-
- findall(X, (brother(X, Z) ; brother(Z, X)), X0), write(X0).
- find_all_brothers(Z) :-
- setof(X, (brother(X, Z) ; brother(Z, X)), X0), write(X0).
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement