Skip to content

Commit 8a735bd

Browse files
Chipe1norvig
authored andcommitted
changed unify_var() (aimacode#344)
1 parent b70a2f5 commit 8a735bd

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

logic.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -796,6 +796,8 @@ def is_variable(x):
796796
def unify_var(var, x, s):
797797
if var in s:
798798
return unify(s[var], x, s)
799+
elif x in s:
800+
return unify(var, s[x], s)
799801
elif occur_check(var, x, s):
800802
return None
801803
else:

0 commit comments

Comments
 (0)