Next: , Previous: , Up: mpg-bpr   [Contents][Index]

11.3.103 ->/2   ISO


+P -> +Q

When occurring other than as the first argument of a disjunction operator (;/2), this is equivalent to:

P -> Q ; fail.



callable, must be nonvar


callable, must be nonvar


This is not normally regarded as a built-in predicate, since it is part of the syntax of the language. However, it is like a built-in predicate in that you can say call((P -> Q)), with identical effect if it does not contain any cuts.

->’ cuts away any choice points in the execution of P

Note that the operator precedence of ‘->’ is greater than 1000, so it dominates commas. Thus, in:

f :- p, q -> r, s.

->’ cuts away any choices in p or in q, but unlike cut (!) it does not cut away the alternative choice for f.

Cuts in P do not make sense, but are allowed, their scope being the goal P. The scope of cuts in Q extends to the containing clause.


Depends on Q.


Call errors (see ref-sem-exc).

See Also


Send feedback on this subject.