Commit 7a1658e8 authored by Aliaume Lopez's avatar Aliaume Lopez

Remove usage of map2 for compatibility reasons

parent 5153dd1b
......@@ -11,7 +11,13 @@
open Utils;;
let produit = Array.map2 (fun a b -> a *. b);;
let produit a b =
let x = Array.make (Array.length a) 0. in
for i = 0 to (Array.length a) - 1 do
x.(i) <- a.(i) *. b.(i);
done;
x;;
let somme = Array.fold_left (fun a b -> a +. b) 0.;;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment