Created
June 6, 2018 09:33
-
-
Save timschonborn/bd2853064258ddea77d9c11bc56663aa to your computer and use it in GitHub Desktop.
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
% greater_than.pl - learnprolognow.org | |
is_number(0). | |
is_number(s(X)) :- is_number(X). | |
% greater_than(X,Y) true if X is greater than Y | |
greater_than(s(0), 0). | |
greater_than(s(X), X). | |
greater_than(s(X), Y) :- greater_than(X, Y). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment