def pop_move
bend-collections@1.0.0.0 · src/containers/binary_heap.bend:248
import bend-collections@1.0.0.0/src/containers/binary_heap.bend as BinaryHeap
import Base
import bend-collections@1.0.0.0/src/containers/types/binary_heap.bend as E
248
249
250def pop_move(~A: Data, ~cmp: A -> A -> Cmp, size: Nat, +m: U32, +depth: Nat, cap: U32, root: A, last: A, arr: Array<Maybe<&2, A>>, empty: Bool) -> Heap<A> & Result<&2, &2, E.Error, A>:
251 match empty:
252 case True{}:
253 (BH{size, m, depth, cap, arr}, Done{root})
254 case False{}:
255 (BH{size, m, depth, cap, sift_down(~A, ~cmp, depth, m, 0, last, arr)}, Done{root})