def grown
import bend-collections@1.0.0.0/src/containers/binary_heap.bend as BinaryHeapimport Base
213# Doubling: the old block becomes the lower half of a block one level deeper,
214# so every element keeps its index.
215def grown(~A: Data, +depth: Nat, arr: Array<Maybe<&2, A>>) -> Array<Maybe<&2, A>>:
216 ANode{arr, empty_slots(~A, depth)}