Skip to content

Commit a830bf4

Browse files
committed
Apply PR feedback
1 parent ddb5a3b commit a830bf4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

modules/ROOT/pages/functions/predicate.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,9 @@ RETURN all(i in emptyList WHERE true) as allTrue, all(i in emptyList WHERE false
110110
|===
111111
| *Syntax* 3+| `allReduce(accumulator = initial, stepVariable IN list \| reductionFunction, predicate)`
112112
| *Description* 3+| Returns true if, during the stepwise evaluation of a value across the elements in a given `LIST<ANY>`, the accumulated result satisfies a specified predicate at every step.
113-
Where that list is a xref:patterns/variable-length-patterns.adoc#group-variables[group variable] defined in a xref:patterns/variable-length-patterns.adoc#quantified-path-patterns[quantified path pattern], it allows for the early pruning of paths that do not satisfy the predicate.
114-
115-
*Note*: AllReduce should not be used for a group variable within a xref:patterns/shortest-paths.adoc[shortest path pattern].
113+
When that list is a xref:patterns/variable-length-patterns.adoc#group-variables[group variable] defined in a xref:patterns/variable-length-patterns.adoc#quantified-path-patterns[quantified path pattern], its predicate will be inlined where applicable.
114+
This inlining allows for early pruning of the search space by discarding paths as soon as the predicate is not satisfied.
115+
Note that `allReduce()` predicates are not inlined when used in a xref:patterns/shortest-paths.adoc[shortest path pattern], and therefore do not benefit from this pruning.
116116
.7+| *Arguments* | *Name* | *Type* | *Description*
117117
| `accumulator` | `ANY` | A variable that holds the result of the `reductionFunction` as the `list` is iterated.
118118
It is initialized with the value of `initial`.

0 commit comments

Comments
 (0)