Model.Balanced: def of bendtorch-core@0.1.0.0 Import: import bendtorch-core@0.1.0.0/src/storage/model.bend as Model Lines 45-54 of bendtorch-core@0.1.0.0/src/storage/model.bend: https://jend.leeeet.dev/read.txt?path=bendtorch-core@0.1.0.0/src/storage/model.bend&start_line=45&end_line=54 import Base def Balanced(-T: Type, d: Nat, array: Array) -> Type: match d array: case 0n ALeaf{x}: Unit case 0n ANode{xs, ys}: Empty case 1n+p ALeaf{x}: Empty case 1n++p ANode{xs, ys}: Balanced(T, p, xs) & Balanced(T, p, ys) Uses (5): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Array https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Empty https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Unit