Jump to content

Loop over multiple arrays simultaneously: Difference between revisions

m
(added factor implementation)
Line 357:
let len = Array.length x in
let b = List.fold_left (fun b a -> b && (Array.length a = len)) true xs in
if not b then raise(Invalid_argumentinvalid_argument "n_arrays_iter: arrays of different length");
for i = 0 to pred len do
let ai = List.map (fun a -> a.(i)) al in
Cookies help us deliver our services. By using our services, you agree to our use of cookies.