]> Repositorios git - scryer-prolog.git/commitdiff
small documentation improvements related to the new indexing strategy
authorMarkus Triska <[email protected]>
Tue, 22 Dec 2020 20:59:11 +0000 (21:59 +0100)
committerMarkus Triska <[email protected]>
Tue, 22 Dec 2020 20:59:11 +0000 (21:59 +0100)
README.md

index 6688f01f51bbabb7a65ddd4920fca17948662a51..2b41ca91c8c1b5cb84922625d6337468e3873bcd 100644 (file)
--- a/README.md
+++ b/README.md
@@ -233,24 +233,23 @@ in all clauses of a predicate's&nbsp;definition. We call this strategy
 first *instantiated* argument indexing.
 
 A key motivation for first instantiated argument indexing is to enable
-indexing for meta-predicates such as `maplist/N` and `foldl/N`, where
-the first argument is a goal or partial goal that is a variable in the
-definition of these predicates and therefore cannot be used for
-indexing.
+indexing for meta-predicates such as `maplist/N` and `foldl/N`, whose
+first argument is a partial goal that is a variable in the definition
+of these predicates and therefore cannot be used for indexing.
 
 For example, a natural definiton of `maplist/2` reads:
 
 ```
 maplist(_, []).
-maplist(Goal, [L|Ls]) :-
-        call(Goal, L),
-        maplist(Goal, Ls).
+maplist(Goal_1, [L|Ls]) :-
+        call(Goal_1, L),
+        maplist(Goal_1, Ls).
 ```
 
 In this case, first instantianted argument indexing automatically uses
 the *second* argument for indexing, and thus prevents choicepoints for
 calls with lists of fixed lengths (and deterministic goals).
-Conveniently, no auxiliary predicates with reorderd arguments are
+Conveniently, no auxiliary predicates with reordered arguments are
 needed to benefit from indexing in such cases.
 
 Conventional first argument&nbsp;indexing naturally arises as a