From 6b879467f36330e9444a6d5b8b050159ad0139e2 Mon Sep 17 00:00:00 2001 From: Mark Thom Date: Thu, 14 Feb 2019 16:12:24 -0400 Subject: [PATCH] fix needless check in dif/2 implementation --- src/prolog/lib/dif.pl | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/prolog/lib/dif.pl b/src/prolog/lib/dif.pl index 7d36d0b8..7199ea88 100644 --- a/src/prolog/lib/dif.pl +++ b/src/prolog/lib/dif.pl @@ -38,10 +38,8 @@ verify_attributes(Var, Value, Goals) :- dif(X, Y) :- X \== Y, ( X \= Y -> true ; term_variables(X, XVars), term_variables(Y, YVars), - ( XVars == [], YVars == [] -> false - ; dif_set_variables(XVars, X, Y), - dif_set_variables(YVars, X, Y) - ) + dif_set_variables(XVars, X, Y), + dif_set_variables(YVars, X, Y) ). gather_dif_goals(Attrs, _) :- @@ -50,7 +48,7 @@ gather_dif_goals([dif(X, Y) | Attrs], Goal) :- gather_dif_goals(Attrs, OldGoal), ( var(OldGoal), !, Goal = dif(X, Y) ; !, Goal = (dif(X, Y), OldGoal) - ). + ). gather_dif_goals([_ | Attrs], Goal) :- gather_dif_goals(Attrs, Goal). -- 2.54.0