let
max a =
Option
.value_exn ~message:
"Math.max: empty"
(
Array
.reduce a ~f:max)