Next: mpg-ref-include, Previous: mpg-ref-if, Up: mpg-bpr [Contents][Index]
->/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))
‘->’ 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. f.
‘->’ 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).