def flatten_checked.fits
import bendtorch-core@0.1.0.0/src/shape/core.bend as Coreimport Base
698def flatten_checked.fits(+shape: Shape, +values: List<&2, U32>, verdict: BoolCase<fit_words(dimensions(shape), values)>) -> Result<&2, &2, Error, FlatIndex<shape>>:
699 match verdict:
700 case BFalse{equal}:
701 Fail{CoordinateOutOfBounds{}}
702 case BTrue{equal}:
703 flat_checked(shape, horner(dimensions(shape), values, 0n))