def offset
import bendtorch-core@0.1.0.0/src/storage/model.bend as Modelimport Base
28def offset(d: Nat, path: Path(d)) -> Nat:
29 match d:
30 case 0n:
31 0n
32 case 1n++p:
33 Step{b, rest} = path
34 offset_step(b, capacity(p), offset(p, rest))