Slice.holds_zero: def of bendtorch-core@0.1.0.0 Import: import bendtorch-core@0.1.0.0/src/tensor/slice.bend as Slice Lines 103-109 of bendtorch-core@0.1.0.0/src/tensor/slice.bend: https://jend.leeeet.dev/read.txt?path=bendtorch-core@0.1.0.0/src/tensor/slice.bend&start_line=103&end_line=109 import Base # Whether some dimension is 0, so the input has no element. def holds_zero(dimensions: List<&2, U32>) -> Bool: match dimensions: case Nil{}: False{} case extent <> rest: Bool.or(Nat.is_eq(U32.to_nat(extent), 0n), holds_zero(rest)) Uses (6): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.or https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.is_eq https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.to_nat