Did you know ... Search Documentation:
GIT commit info
Corrected spelling error
authorTorbjörn Lager
Sun Mar 4 21:17:40 2018 +0100
committerWiki manager
Sun Mar 4 21:17:40 2018 +0100
commit35db60ab05347737347b1111fb44726c598f683e
treed261f10b91e48f69712492ca4c31ba8b0d80b6e5
parentf02a610a4cb78256c02cf1fecf4ac3b7719556a5
Diff style: patch stat
diff --git a/pengines/Genealogist.txt b/pengines/Genealogist.txt
index a7c36c9..447aa76 100644
--- a/pengines/Genealogist.txt
+++ b/pengines/Genealogist.txt
@@ -3,8 +3,8 @@
 A _genealogist_ is a person who traces or studies the descent of persons or families. Since a logic program capable of reasoning about family relations happens to be the "Hello World" of Prolog, we thought it would be appropriate to stick to this domain when building our first Pengines application. A typical example of such a program would be a file with the following content:
 
   ~~~~
-ancestor_decendant(X, Y) :- parent_child(X, Y).
-ancestor_decendant(X, Z) :- parent_child(X, Y), ancestor_decendant(Y, Z).
+ancestor_descendant(X, Y) :- parent_child(X, Y).
+ancestor_descendant(X, Z) :- parent_child(X, Y), ancestor_descendant(Y, Z).
 
 siblings(X, Y) :- parent_child(Z, X), parent_child(Z, Y), X @< Y.
 
@@ -22,15 +22,15 @@ The first thing we need to do is to make this into an SWI-Prolog _module_. We do
 
   ~~~~
 :- module(genealogist, 
-	[  ancestor_decendant/2,
+	[  ancestor_descendant/2,
            siblings/2,
 	   parent_child/2,
 	   father_child/2,
 	   mother_child/2
 	]).
 
-ancestor_decendant(X, Y) :- parent_child(X, Y).
-ancestor_decendant(X, Z) :- parent_child(X, Y), ancestor_decendant(Y, Z).
+ancestor_descendant(X, Y) :- parent_child(X, Y).
+ancestor_descendant(X, Z) :- parent_child(X, Y), ancestor_descendant(Y, Z).
 
 siblings(X, Y) :- parent_child(Z, X), parent_child(Z, Y), X @< Y.
 
@@ -69,7 +69,7 @@ At last, we may (re)start our Pengines server and test our application. We can f
 ?- use_module(library(pengines)).
 true.
 
-?- pengine_rpc('http://localhost:3030', ancestor_decendant(X, Y), [
+?- pengine_rpc('http://localhost:3030', ancestor_descendant(X, Y), [
          application(genealogist)
      ]).
 X = trude,