def Mat.to_list_count
import bend-ml-tensor-array@0.1.19.0/main.bend as BendMlTensorArrayimport Base
808# n numbers from index 0, in row order; n = 0 gives the empty list (a Mat with no numbers)
809def Mat.to_list_count(-r: Nat, -c: Nat, d: Array<F32>, +n: Nat) -> ML<r, c>:
810 match n:
811 case 0n:
812 ML{Mat{d}, Nil{}}
813 case 1n+p:
814 Mat.to_list2(r, c, read_l(p, (U32.from_nat(n) - 1 : U32), Nil{}, Array.get(F32, d, (U32.from_nat(n) - 1 : U32))))