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 -> int
val is_empty : (_, _) T.t -> bool
val iter : ('a, _) T.t -> f:('a T.elt -> unit) -> unit
val fold : ('a, _) T.t -> init:'acc -> f:('acc -> 'a T.elt -> 'acc) -> 'acc
val exists : ('a, _) T.t -> f:('a T.elt -> bool) -> bool
val for_all : ('a, _) T.t -> f:('a T.elt -> bool) -> bool
val count : ('a, _) T.t -> f:('a T.elt -> bool) -> int
val find : ('a, _) T.t -> f:('a T.elt -> bool) -> 'a T.elt option
val find_map : ('a, _) T.t -> f:('a T.elt -> 'b option) -> 'b option
val to_list : ('a, _) T.t -> 'a T.elt list
val to_array : ('a, _) T.t -> 'a T.elt array
These 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) -> unit
val existsi : ('a, _) T.t -> f:(int -> 'a T.elt -> bool) -> bool
val for_alli : ('a, _) T.t -> f:(int -> 'a T.elt -> bool) -> bool
val counti : ('a, _) T.t -> f:(int -> 'a T.elt -> bool) -> int
val findi :
('a, _) T.t ->
f:(int -> 'a T.elt -> bool) ->
(int * 'a T.elt) option
val find_mapi : ('a, _) T.t -> f:(int -> 'a T.elt -> 'b option) -> 'b option