# let lenses = [14, 2.8; 21, 3.2; 31, 1.8; 35, 2.; 35, 2.8; 40, 2.8; 43, 1.9; 50, 1.4; 55, 1.4; 70, 2.4; 77, 1.8; 85, 1.4];;
val lenses : (int * float) list =
[(14, 2.8); (21, 3.2); (31, 1.8); (35, 2.); (35, 2.8); (40, 2.8);
(43, 1.9); (50, 1.4); (55, 1.4); (70, 2.4); (77, 1.8); (85, 1.4)]
# let equivs = List.map (fun (l, a) -> Printf.sprintf "%0.0f f%0.1f" (float_of_int l *. 1.53) a) lenses;;
val equivs : string list =
["21 f2.8"; "32 f3.2"; "47 f1.8"; "54 f2.0"; "54 f2.8"; "61 f2.8";
"66 f1.9"; "77 f1.4"; "84 f1.4"; "107 f2.4"; "118 f1.8"; "130 f1.4"]
# print_endline (List.fold_left (fun a b -> a ^ ", " ^ b) (List.hd equivs) (List.tl equivs));;
21 f2.8, 32 f3.2, 47 f1.8, 54 f2.0, 54 f2.8, 61 f2.8, 66 f1.9, 77 f1.4, 84 f1.4, 107 f2.4, 118 f1.8, 130 f1.4
- : unit = ()
# |