Update prolog samples

This commit is contained in:
Ted Nyman
2013-12-29 12:24:02 -08:00
parent fbcad41813
commit 016f9852d6
3 changed files with 92 additions and 3 deletions

View File

@@ -0,0 +1,12 @@
-/* Prolog test file */
-male(john).
-male(peter).
-
-female(vick).
-female(christie).
-
-parents(john, peter, christie).
-parents(vick, peter, christie).
-
-/* X is a brother of Y */
-brother(X, Y) :- male(X), parents(X, F, M), parents(Y, F, M).