def fit
import bendtorch-core@0.1.0.0/src/shape/core.bend as Coreimport Base
342def fit(dims: List<&2, Nat>, values: List<&2, Nat>) -> Bool:
343 match dims values:
344 case Nil{} Nil{}:
345 True{}
346 case dh <> dt vh <> vt:
347 Bool.and(Nat.is_lt(vh, dh), fit(dt, vt))
348 case Nil{} vh <> vt:
349 False{}
350 case dh <> dt Nil{}:
351 False{}