mirror of
https://github.com/kanaka/mal.git
synced 2024-08-16 17:20:23 +03:00
Merge pull request #111 from dubek/fix-go-hash-equality
go: fix hash equality
This commit is contained in:
commit
3ac3435ee1
@ -295,7 +295,17 @@ func Equal_Q(a MalType, b MalType) bool {
|
||||
}
|
||||
return true
|
||||
case HashMap:
|
||||
return false
|
||||
am := a.(HashMap).Val
|
||||
bm := b.(HashMap).Val
|
||||
if len(am) != len(bm) {
|
||||
return false
|
||||
}
|
||||
for k, v := range am {
|
||||
if !Equal_Q(v, bm[k]) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true
|
||||
default:
|
||||
return a == b
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user