Kxclib.Arrayinclude module type of struct include Array0 endinclude module type of struct include Stdlib.Array endmodule Floatarray = Array0.Floatarrayinclude sig ... endval mean : ?f:(float -> float) -> float t -> floatblastsat find the last element e such that pred e being true using binary search.
more specifically,
pred yields false for every element, Not_found is raisedwhen there exists i >= 0 such that
forall k <= i. (pred arr.(k)) = true /\ forall k > i, (pred arr.(k)) = false
, the i-th element will be returned
module Ops_piping : sig ... endmodule Ops_monad : sig ... endmodule Ops : sig ... end