Elementwise.same_right: def of bendtorch-core@0.1.0.0 Import: import bendtorch-core@0.1.0.0/src/tensor/elementwise.bend as Elementwise Lines 278-285 of bendtorch-core@0.1.0.0/src/tensor/elementwise.bend: https://jend.leeeet.dev/read.txt?path=bendtorch-core@0.1.0.0/src/tensor/elementwise.bend&start_line=278&end_line=285 import Base import bendtorch-core@0.1.0.0/src/shape/core.bend as Shape def same_right(rows: List<&2, Shape.Row>) -> Bool: match rows: case Shape.Row{+stride, left, +right} <> Nil{}: Bool.and(Nat.is_eq(stride, 1n), Nat.is_eq(right, 1n)) case Shape.Row{+stride, left, +right} <> rest: Bool.and(Nat.is_eq(right, stride), same_right(rest)) case Nil{}: False{} Uses (5): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.and 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=bendtorch-core@0.1.0.0/src/shape/core.bend&name=Row