yes :- ab(X), !, X=b.
yes.

ab(a).
ab(b).

% ?- yes.

% Compute the maximum Z of X and Y:
max(X,Y,Z) :- X>Y -> Z=X ; Z=Y.
