Base.Indexed_containerSourceProvides generic signatures for containers that support indexed iteration (iteri, foldi, ...). In principle, any container that has iter can also implement iteri, but the idea is that Indexed_container_intf should be included only for containers that have a meaningful underlying ordering.
include Derivedval foldi :
fold:('t -> init:'acc -> f:('acc -> 'a -> 'acc) -> 'acc) ->
't ->
init:'acc ->
f:(int -> 'acc -> 'a -> 'acc) ->
'accval iteri :
fold:('t -> init:int -> f:(int -> 'a -> int) -> int) ->
't ->
f:(int -> 'a -> unit) ->
unitGeneric definitions of indexed container operations in terms of foldi.
val counti :
foldi:('t -> init:int -> f:(int -> int -> 'a -> int) -> int) ->
't ->
f:(int -> 'a -> bool) ->
intGeneric definitions of indexed container operations in terms of iteri.
val existsi :
iteri:('t -> f:(int -> 'a -> unit) -> unit) ->
't ->
f:(int -> 'a -> bool) ->
boolval for_alli :
iteri:('t -> f:(int -> 'a -> unit) -> unit) ->
't ->
f:(int -> 'a -> bool) ->
boolval findi :
iteri:('t -> f:(int -> 'a -> unit) -> unit) ->
't ->
f:(int -> 'a -> bool) ->
(int * 'a) optionval find_mapi :
iteri:('t -> f:(int -> 'a -> unit) -> unit) ->
't ->
f:(int -> 'a -> 'b option) ->
'b optionmodule Make0_with_creators
(T : sig ... end) :
S0_with_creators with type t := T.t and type elt := T.Elt.tmodule Make_gen_with_creators
(T : sig ... end) :
Generic_with_creators
with type ('a, 'phantom) t := ('a, 'phantom) T.t
and type 'a elt := 'a T.elt
and type ('a, 'phantom) concat := ('a, 'phantom) T.concat