Module Base__.Indexed_container

Provides 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.

Generic definitions of foldi and iteri in terms of fold.

E.g., iteri ~fold t ~f = ignore (fold t ~init:0 ~f:(fun i x -> f i x; i + 1)).

val foldi : fold:('t'a'accumBase__.Indexed_container_intf.fold ‑> ('t'a'accumBase__.Indexed_container_intf.foldi
val iteri : fold:('t'a, int) Base__.Indexed_container_intf.fold ‑> ('t'aBase__.Indexed_container_intf.iteri

Generic definitions of indexed container operations in terms of foldi.

val counti : foldi:('t'a, int) Base__.Indexed_container_intf.foldi ‑> 't ‑> f:(int ‑> 'a ‑> bool) ‑> int

Generic definitions of indexed container operations in terms of iteri.

val existsi : iteri:('t'aBase__.Indexed_container_intf.iteri ‑> 't ‑> f:(int ‑> 'a ‑> bool) ‑> bool
val for_alli : iteri:('t'aBase__.Indexed_container_intf.iteri ‑> 't ‑> f:(int ‑> 'a ‑> bool) ‑> bool
val findi : iteri:('t'aBase__.Indexed_container_intf.iteri ‑> 't ‑> f:(int ‑> 'a ‑> bool) ‑> (int * 'a) option
val find_mapi : iteri:('t'aBase__.Indexed_container_intf.iteri ‑> 't ‑> f:(int ‑> 'a ‑> 'b option) ‑> 'b option
module Make : functor (T : Base__.Indexed_container_intf.Make_arg) -> S1 with type t := a T.t