def bounded
import bendtorch-core@0.1.0.0/src/tensor/layout.bend as Layoutimport Base
27def bounded(axes: List<&2, U32>, +rank: U32) -> Bool:
28 match axes:
29 case Nil{}:
30 True{}
31 case head <> tail:
32 Bool.and(U32.is_lt(head, rank), bounded(tail, rank))