Skip to content

Instantly share code, notes, and snippets.

@jrdmcgr
Created August 24, 2015 01:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jrdmcgr/25562f0647f18e88676f to your computer and use it in GitHub Desktop.
Save jrdmcgr/25562f0647f18e88676f to your computer and use it in GitHub Desktop.
mortals.pl
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