Created
December 21, 2018 14:33
-
-
Save DonaldKellett/34cbf5c0616c33f0e018b15d11c4d41b to your computer and use it in GitHub Desktop.
Learn Prolog Now! - Chapter 1 - Exercise 1.4 - Possible solution
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% Butch is a killer. | |
killer(butch). | |
% Mia and Marsellus are married. | |
married(mia, marsellus). | |
% Zed is dead. | |
dead(zed). | |
% Marsellus kills everyone who gives Mia a footmassage. | |
kills(marsellus, X) :- gives_footmassage(X, mia). | |
% Mia loves everyone who is a good dancer. | |
loves(mia, X) :- good_dancer(X). | |
% Jules eats anything that is nutritious or tasty. | |
eats(jules, X) :- nutritious(X); tasty(X). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment