diff --git a/pl/arith.yap b/pl/arith.yap index 131cbdfcc..3c3989e17 100644 --- a/pl/arith.yap +++ b/pl/arith.yap @@ -399,40 +399,40 @@ succ(M,N) :- N < 0, '$do_error'(domain_error(not_less_than_zero, N),succ(M,N)). -plus(X, Y, Z) : +plus(X, Y, Z) :- ( var(X) - > + -> ( integer(Y), integer(Z) - > + -> '$minus'(Z,Y,X) ; '$plus_error'(X,Y,Z) ) ; integer(X) - > + -> ( var(Y) - > + -> ( integer(Z) - > + -> '$minus'(Z,X,Y) ; '$plus_error'(X,Y,Z) ) ; integer(Y) - > + -> ( integer(Z) - > + -> '$minus'(Z,Y,X) ; var(Z) - > + -> '$plus'(X,Y,Z) ; '$plus_error'(X,Y,Z)