def flat_checked.finish

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

import bendtorch-core@0.1.0.0/src/shape/core.bend as Core
import Base

688def flat_checked.finish(-shape: Shape, +index: Nat, verdict: BoolCase<Nat.is_lt(index, elements(shape))>) -> Result<&2, &2, Error, FlatIndex<shape>>:
689  match verdict:
690    case BFalse{equal}:
691      Fail{FlatIndexOutOfBounds{}}
692    case BTrue{equal}:
693      Done{FIndex{index, equal}}

Uses (8)

Used by (6)