Averages/Arithmetic mean: Difference between revisions

(→‎{{header|OCaml}}: breaking lines too long)
Line 600:
the List.fold_left, and for mean_ints it is possible to save calling
float_of_int on every numbers, converting only the result of the addition.
(also when using List.map and when the order is not important, you can use
List.rev_map instead to save an internal call to List.rev).
Also the task asks to return 0 on empty lists, but in OCaml this case
would rather be handled by an exception.
Anonymous user