summaryrefslogtreecommitdiff
path: root/tests/examplefiles/sibling.prolog
diff options
context:
space:
mode:
Diffstat (limited to 'tests/examplefiles/sibling.prolog')
-rw-r--r--tests/examplefiles/sibling.prolog19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/examplefiles/sibling.prolog b/tests/examplefiles/sibling.prolog
new file mode 100644
index 00000000..bc591502
--- /dev/null
+++ b/tests/examplefiles/sibling.prolog
@@ -0,0 +1,19 @@
+/* Comments /* can nest */
+still a comment
+*/
+
+:- module(maplist, maplist/3)
+
+assert(world:done). % asserts
+
+sibling(X, Y) :- parent_child(Z, X), parent_child(Z, Y).
+
+parent_child(X, Y) :- father_child(X, Y).
+parent_child(X, Y) :- mother_child(X, Y).
+
+mother_child(trude, sally).
+
+father_child(tom, sally).
+father_child(tom, erica).
+father_child(mike, tom).
+