def sift_down

bend-collections@1.0.0.0 · src/containers/binary_heap.bend:207

import bend-collections@1.0.0.0/src/containers/binary_heap.bend as BinaryHeap
import Base

207# Place x at slot i of a heap of `size` elements and restore heap order down.
208def sift_down(~A: Data, ~cmp: A -> A -> Cmp, fuel: Nat, +size: U32, i: U32, +x: A, arr: Array<Maybe<&2, A>>) -> Array<Maybe<&2, A>>:
209  down_go(~A, ~cmp, fuel, size, x, down_probe(~A, ~cmp, size, i, x, arr))

Uses (7)

Used by (2)