Skip to content

Commit 19fb53c

Browse files
committed
fix: modified heapPush to yield expected result
1 parent 3491a47 commit 19fb53c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

utils.metta

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,7 @@
652652
(= (heapPush $list $item)
653653
(let*
654654
(
655-
($appendedList (union-atom ($item) $list))
655+
($appendedList (union-atom $list ($item)))
656656
($lastIndex (- (size-atom $appendedList) 1))
657657
(($pushedList $index) (until isNodeLargerThanParent swapWithParent ($appendedList $lastIndex)))
658658
)

0 commit comments

Comments
 (0)