Skip to content

Commit

Permalink
fix equal builtin function (#59)
Browse files Browse the repository at this point in the history
  • Loading branch information
JunNishimura committed Oct 14, 2024
1 parent 06d1aaa commit 57612c7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions evaluator/builtins.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ var builtins = map[string]*object.Builtin{
}

for i := 0; i < len(arrayArg.Elements)-1; i++ {
if arrayArg.Elements[i] != arrayArg.Elements[i+1] {
if arrayArg.Elements[i].Inspect() != arrayArg.Elements[i+1].Inspect() {
return False
}
}
Expand All @@ -157,7 +157,7 @@ var builtins = map[string]*object.Builtin{
}

for i := 0; i < len(arrayArg.Elements)-1; i++ {
if arrayArg.Elements[i] != arrayArg.Elements[i+1] {
if arrayArg.Elements[i].Inspect() != arrayArg.Elements[i+1].Inspect() {
return True
}
}
Expand Down

0 comments on commit 57612c7

Please sign in to comment.