def equal
import bendtorch-core@0.1.0.0/src/tensor/gather.bend as Gatherimport Base
97# Whether two lists of dimensions are equal.
98def equal(left: List<&2, U32>, right: List<&2, U32>) -> Bool:
99 match left right:
100 case Nil{} Nil{}:
101 True{}
102 case x <> xs y <> ys:
103 Bool.and(Nat.is_eq(U32.to_nat(x), U32.to_nat(y)), equal(xs, ys))
104 case _ _:
105 False{}