def equal

bendtorch-core@0.1.0.0 · src/tensor/gather_LAWS.bend:47

import bendtorch-core@0.1.0.0/src/tensor/gather_LAWS.bend as GatherLAWS
import Base

47# Whether two lists of extents are equal, extent by extent.
48def equal(left: List<&2, U32>, right: List<&2, U32>) -> Bool:
49  match left right:
50    case Nil{} Nil{}:
51      True{}
52    case x <> xs y <> ys:
53      Bool.and(Nat.is_eq(U32.to_nat(x), U32.to_nat(y)), equal(xs, ys))
54    case _ _:
55      False{}

Uses (6)

Used by (2)