]> Repositorios git - scryer-prolog.git/commitdiff
fix needless check in dif/2 implementation
authorMark Thom <[email protected]>
Thu, 14 Feb 2019 20:12:24 +0000 (16:12 -0400)
committerMark Thom <[email protected]>
Thu, 14 Feb 2019 20:12:24 +0000 (16:12 -0400)
src/prolog/lib/dif.pl

index 7d36d0b83968bef0648dd1c35514425eb336d7e6..7199ea8841abc21982e5a3617dbf9eacaeb98e0d 100644 (file)
@@ -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).