The when a predicate is defined, it is applied globally. Take the following query:
((item) @a (#eq? @a @a))
(thing) @b
One would expect that the predicate only applies to the pattern it is declared in, but it would instead be executed for all other patterns within the query.
In the example provided, @a would be matched as per normal, while the pattern @b would not be matched at all.
The when a predicate is defined, it is applied globally. Take the following query:
One would expect that the predicate only applies to the pattern it is declared in, but it would instead be executed for all other patterns within the query. In the example provided,
@a
would be matched as per normal, while the pattern@b
would not be matched at all.