Continue_or_stop.t is used by the f argument to fold_until in order to indicate whether folding should continue, or stop early.
Generic definitions of container operations in terms of fold.
E.g.: iter ~fold t ~f = fold t ~init:() ~f:(fun () a -> f a).
Sourcetype ('t, 'a, 'accum) fold =
't ->
init:'accum ->
f:('accum -> 'a -> 'accum) ->
'accum Sourcetype ('t, 'a) iter = 't -> f:('a -> unit) -> unit Sourcetype 't length = 't -> int Sourceval count : fold:('t, 'a, int) fold -> 't -> f:('a -> bool) -> int Sourceval min_elt :
fold:('t, 'a, 'a option) fold ->
't ->
compare:('a -> 'a -> int) ->
'a option Sourceval max_elt :
fold:('t, 'a, 'a option) fold ->
't ->
compare:('a -> 'a -> int) ->
'a option Sourceval length : fold:('t, _, int) fold -> 't -> int Sourceval to_list : fold:('t, 'a, 'a list) fold -> 't -> 'a list Sourceval sum :
fold:('t, 'a, 'sum) fold ->
(module Summable with type t = 'sum) ->
't ->
f:('a -> 'sum) ->
'sum Sourceval fold_until :
fold:('t, 'a, 'b) fold ->
init:'b ->
f:('b -> 'a -> ('b, 'final) Continue_or_stop.t) ->
finish:('b -> 'final) ->
't ->
'final Sourceval is_empty : iter:('t, 'a) iter -> 't -> bool Generic definitions of container operations in terms of iter and length.
Sourceval exists : iter:('t, 'a) iter -> 't -> f:('a -> bool) -> bool Sourceval for_all : iter:('t, 'a) iter -> 't -> f:('a -> bool) -> bool Sourceval find : iter:('t, 'a) iter -> 't -> f:('a -> bool) -> 'a option Sourceval find_map : iter:('t, 'a) iter -> 't -> f:('a -> 'b option) -> 'b option The idiom for using Container.Make is to bind the resulting module and to explicitly import each of the functions that one wants: