Created
December 18, 2015 13:29
-
-
Save dbellettini/30ed8e8482582a3bb2a9 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
katalist(X, X, equal) :- !. | |
katalist(X, Y, sublist) :- sublist(X, Y), !. | |
katalist(X, Y, superlist) :- sublist(Y, X), !. | |
katalist(_, _, unequal) :- !. | |
prefix(X, L) :- append(X, _, L). | |
suffix(X, L) :- append(_, X, L). | |
sublist(X, L) :- suffix(S, L), prefix(X, S). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment