Consider the Prolog predicated p(integer),q(integer),r(integer)
with the flow model (o)
and the predicate s
:
p(1). q(1). r(1).
p(2). q(2). r(2).
s:-!,p(X),q(Y),r(Z),write(X,Y,Z),nl.
Give the result of the following goal: s
. Justify the answer.
The result is 111,112,121,122,211,212,221,222. I have seen that the cut has no effect if it is at the beginning of a clause. Is this true?
question from:https://stackoverflow.com/questions/65642875/cut-at-the-beginning-of-a-clause