->/2+-P -> +*Q
"Local cut"
If P then Q else fail, using first solution of P only.
When occurring other than as the first argument of a disjunction operator
(| or ;), this is equivalent to:
P -> Q | fail.
(For a definition of P -> Q | R,
see ref-sem-con.)
-> 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.
context_error