def words_check
bendtorch-core@0.1.0.0 · src/tensor/layout.bend:237
import bendtorch-core@0.1.0.0/src/tensor/layout.bend as Layout
import Base
import bendtorch-core@0.1.0.0/src/shape/core.bend as Shape
237def words_check(+dims: List<&2, U32>, +coordinates: List<&2, U32>) -> Result<&2, &2, Shape.Error, WordsValid(dims, coordinates)>:
238 match dims coordinates:
239 case Nil{} Nil{}:
240 Done{Unit{}}
241 case +dh <> +dt +ch <> +ct:
242 words_decided(dh, dt, ch, ct, unit => words_check(dt, ct), Shape.bool_case(U32.is_lt(ch, dh)))
243 case _ _:
244 Fail{Shape.CoordinateRankMismatch{}}