aboutsummaryrefslogtreecommitdiff
path: root/samples/Prolog
diff options
context:
space:
mode:
Diffstat (limited to 'samples/Prolog')
-rw-r--r--samples/Prolog/test-prolog.pl12
1 files changed, 12 insertions, 0 deletions
diff --git a/samples/Prolog/test-prolog.pl b/samples/Prolog/test-prolog.pl
new file mode 100644
index 0000000..aab83d5
--- /dev/null
+++ b/samples/Prolog/test-prolog.pl
@@ -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).