Signed.exact_product: def of bendtorch-core@0.1.0.0 Import: import bendtorch-core@0.1.0.0/src/tensor/signed.bend as Signed Lines 92-102 of bendtorch-core@0.1.0.0/src/tensor/signed.bend: https://jend.leeeet.dev/read.txt?path=bendtorch-core@0.1.0.0/src/tensor/signed.bend&start_line=92&end_line=102 import Base # The product of the exact sizes, in Nat: what the laws state the inference # against. The inference never forms it, since it can pass the native Nat # limit of 2^48 on an empty input: [-1, 2^24, 2^24] multiplies to 2^48. def exact_product(extents: List<&2, Extent>) -> Nat: match extents: case Nil{}: 1n case Exact{+size} <> tail: Nat.mul(U32.to_nat(size), exact_product(tail)) case Inferred{} <> tail: exact_product(tail) Uses (5): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.mul https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.to_nat https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/signed.bend&name=Extent