Model.observe: def of bendtorch-core@0.1.0.0 Import: import bendtorch-core@0.1.0.0/src/storage/model.bend as Model Lines 56-70 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=56&end_line=70 import Base def observe(-T: Data, d: Nat, array: Array, path: Path(d)) -> Maybe<&2, T>: match d array: case 0n ALeaf{x}: Some{x} case 0n ANode{xs, ys}: None{} case 1n+p ALeaf{x}: None{} case 1n+p ANode{xs, ys}: Step{bit, rest} = path match bit: case False{}: observe(T, p, xs, rest) case True{}: observe(T, p, ys, rest) Uses (6): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Array https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/storage/model.bend&name=Path https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/storage/model.bend&name=Step