BinaryHeap.push_room: def of bend-collections@1.0.0.0 Import: import bend-collections@1.0.0.0/src/containers/binary_heap.bend as BinaryHeap Lines 218-223 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=218&end_line=223 import Base def push_room(~A: Data, ~cmp: A -> A -> Cmp, size: Nat, +n: U32, +depth: Nat, +cap: U32, arr: Array>, x: A, room: Bool) -> Heap: match room: case True{}: BH{1n+size, U32.inc(n), depth, cap, sift_up(~A, ~cmp, depth, n, x, arr)} case False{}: BH{1n+size, U32.inc(n), 1n+depth, U32.shl(cap), sift_up(~A, ~cmp, 1n+depth, n, x, grown(~A, depth, arr))} Uses (11): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Array https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Cmp https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.inc https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.shl 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=grown https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/containers/binary_heap.bend&name=sift_up