BinaryHeap.push: def of bend-collections@1.0.0.0
Import: import bend-collections@1.0.0.0/src/containers/binary_heap.bend as BinaryHeap
Lines 225-227 of bend-collections@1.0.0.0/src/containers/binary_heap.bend: https://jend.leeeet.dev/read.txt?path=bend-collections@1.0.0.0/src/containers/binary_heap.bend&start_line=225&end_line=227
import Base
def push(~A: Data, ~cmp: A -> A -> Cmp, h: Heap, x: A) -> Heap:
BH{size, +n, +depth, +cap, arr} = h
push_room(~A, ~cmp, size, n, depth, cap, arr, x, U32.is_lt(n, cap))
Uses (4):
https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Cmp
https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.is_lt
https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/containers/binary_heap.bend&name=Heap
https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/containers/binary_heap.bend&name=push_room