module type S0 = Container_intf.S0module type S0_phantom = Container_intf.S0_phantommodule type S1 = Container_intf.S1module type S1_phantom_invariant = Container_intf.S1_phantom_invariantmodule type S1_phantom = Container_intf.S1_phantommodule type Generic = Container_intf.Genericmodule type Generic_phantom = Container_intf.Generic_phantomGeneric definitions of container operations in terms of fold.
E.g.: iter ~fold t ~f = fold t ~init:() ~f:(fun () a -> f a).
val count : fold:('t, 'a, int) fold ‑> 't ‑> f:('a ‑> bool) ‑> intval min_elt : fold:('t, 'a, 'a option) fold ‑> 't ‑> cmp:('a ‑> 'a ‑> int) ‑> 'a optionval max_elt : fold:('t, 'a, 'a option) fold ‑> 't ‑> cmp:('a ‑> 'a ‑> int) ‑> 'a optionval length : fold:('t, _, int) fold ‑> 't ‑> intval to_list : fold:('t, 'a, 'a list) fold ‑> 't ‑> 'a listval to_array : fold:('t, 'a, 'a list) fold ‑> 't ‑> 'a arrayval sum : fold:('t, 'a, 'sum) fold ‑> (module Commutative_group.S with type t = 'sum) ‑> 't ‑> f:('a ‑> 'sum) ‑> 'sumval fold_until : fold:('t, 'a, 'b) fold ‑> init:'b ‑> f:('b ‑> 'a ‑> ('b, 'stop) Container_intf.Continue_or_stop.t) ‑> 't ‑> ('b, 'stop) Container_intf.Finished_or_stopped_early.tval is_empty : iter:('t, 'a) iter ‑> 't ‑> boolGeneric definitions of container operations in terms of iter.
val exists : iter:('t, 'a) iter ‑> 't ‑> f:('a ‑> bool) ‑> boolval for_all : iter:('t, 'a) iter ‑> 't ‑> f:('a ‑> bool) ‑> boolval find : iter:('t, 'a) iter ‑> 't ‑> f:('a ‑> bool) ‑> 'a optionval find_map : iter:('t, 'a) iter ‑> 't ‑> f:('a ‑> 'b option) ‑> 'b option