Parameters
Signature
include Container.Generic
with type ('a, 'phantom) t := ('a, 'phantom) T.t
with type 'a elt := 'a T.elt
val length : (_, _) T.t -> intval is_empty : (_, _) T.t -> boolval iter : ('a, _) T.t -> f:('a T.elt -> unit) -> unitval fold : ('a, _) T.t -> init:'acc -> f:('acc -> 'a T.elt -> 'acc) -> 'accval exists : ('a, _) T.t -> f:('a T.elt -> bool) -> boolval for_all : ('a, _) T.t -> f:('a T.elt -> bool) -> boolval count : ('a, _) T.t -> f:('a T.elt -> bool) -> intval find : ('a, _) T.t -> f:('a T.elt -> bool) -> 'a T.elt optionval find_map : ('a, _) T.t -> f:('a T.elt -> 'b option) -> 'b optionval to_list : ('a, _) T.t -> 'a T.elt listval to_array : ('a, _) T.t -> 'a T.elt arrayThese are all like their equivalents in Container except that an index starting at 0 is added as the first argument to f.
val foldi : ('a, _) T.t -> init:_ -> f:(int -> _ -> 'a T.elt -> _) -> _val iteri : ('a, _) T.t -> f:(int -> 'a T.elt -> unit) -> unitval existsi : ('a, _) T.t -> f:(int -> 'a T.elt -> bool) -> boolval for_alli : ('a, _) T.t -> f:(int -> 'a T.elt -> bool) -> boolval counti : ('a, _) T.t -> f:(int -> 'a T.elt -> bool) -> intval findi :
('a, _) T.t ->
f:(int -> 'a T.elt -> bool) ->
(int * 'a T.elt) optionval find_mapi : ('a, _) T.t -> f:(int -> 'a T.elt -> 'b option) -> 'b option