def batch_of
import bendtorch-core@0.1.0.0/src/tensor/batched_matmul_LAWS.bend as BatchedMatmulLAWSimport Base
308# Every extent but the last two: the batch.
309def batch_of(dims: List<&2, Nat>) -> List<&2, Nat>:
310 match dims:
311 case +x <> +y <> +z <> tail:
312 x <> batch_of(y <> z <> tail)
313 case rest:
314 Nil{}