def high
import bend-collections@1.0.0.0/spec/lib/common.bend as Commonimport Base
45def high(k: Nat, +n: Nat) -> Nat:
46 match k:
47 case 0n:
48 n
49 case 1n+p:
50 high(p, half(n))
import bend-collections@1.0.0.0/spec/lib/common.bend as Commonimport Base
45def high(k: Nat, +n: Nat) -> Nat:
46 match k:
47 case 0n:
48 n
49 case 1n+p:
50 high(p, half(n))