SyntaxFix
Write A Post
Hire A Developer
Questions
You should read Learn Prolog Now! Chapter 10.2 Using Cut. This provides an example:
max(X,Y,Z) :- X =< Y,!, Y = Z.
to be said,
Z is equal to Y IF ! is true (which it always is) AND X is <= Y.
Z
Y
!
X
<= Y