def cap_depth
import bend-ml-tensor-array@0.1.19.0/main.bend as BendMlTensorArrayimport Base
626# the depth d such that an Array with 2^d slots holds n elements (the smallest such d)
627def cap_depth(+n: Nat) -> Nat:
628 fst_nat(cap_dbl(n, Nat.is_le(n, 1n), n, 0n, 1n))