domains x = integer predicates max(x,x,x) clauses max(X,Y,Max) :- X > Y,!, Max = X. max(X,Y,Max) :- Max = Y. Output : Goal: max(2,3,Max) Max=3 1 Solution Goal: max(-1,-4,Max) Max=-1 1 Solution