def flatten_checked.fits

bendtorch-core@0.1.0.0 · src/shape/core.bend:698

import bendtorch-core@0.1.0.0/src/shape/core.bend as Core
import 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))

Uses (11)

Used by (3)