Negative patterns typically search for some prohibited context of the partial match of the container
(positive) pattern. If a match is found for the negative pattern, then the match of the container pattern is
invalidated.
When a pattern has multiple negative subpatterns, a successful matching of any of its subpatterns
invalidates the container pattern.
When a negative pattern itself has an embedded negative subpattern (i.e. negation of negation) then the
matching of the subpattern may invalidate the matching of the negative pattern itself, thus the original
(positive) container pattern is not invalidated.
Note that when a match is found for a negative pattern, no assignment of pattern variables is passed back to
its container pattern.
|