Created
August 24, 2015 01:01
-
-
Save jrdmcgr/25562f0647f18e88676f to your computer and use it in GitHub Desktop.
mortals.pl
This file contains 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
declare_mortals([]). | |
declare_mortals([X|Xs]) :- mortal(X), declare_mortals(Xs). | |
mortal(socrates). | |
main :- | |
OtherMortals = [plato, aristotle, philosoraptor], | |
declare_mortals(OtherMortals). | |
% ?- main. | |
% false. | |
% | |
% ?- mortal(Name). | |
% Name = socrates. | |
% I'm expecting: | |
% Name = socrates. | |
% Name = plato. | |
% Name = aristotle. | |
% Name = philosoraptor. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment