def fit_values

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

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

428def fit_values(dims: List<&2, U32>, values: List<&2, Nat>) -> Bool:
429  match dims values:
430    case Nil{} Nil{}:
431      True{}
432    case dh <> dt vh <> vt:
433      Bool.and(Nat.is_lt(vh, U32.to_nat(dh)), fit_values(dt, vt))
434    case Nil{} vh <> vt:
435      False{}
436    case dh <> dt Nil{}:
437      False{}

Uses (7)

Used by (6)