Parameters
Signature
include Container.Generic_with_creators
with type ('a, 'phantom) t := ('a, 'phantom) T.t
with type 'a elt := 'a T.elt
with type ('a, 'phantom) concat := ('a, 'phantom) T.concat
val of_list : 'a T.elt list -> ('a, _) T.tval of_array : 'a T.elt array -> ('a, _) T.tval append : ('a, 'p) T.t -> ('a, 'p) T.t -> ('a, 'p) T.tval filter : ('a, 'p) T.t -> f:('a T.elt -> bool) -> ('a, 'p) T.tval filter_map :
('a, 'p) T.t ->
f:('a T.elt -> 'b T.elt option) ->
('b, 'p) T.tval concat_map : ('a, 'p) T.t -> f:('a T.elt -> ('b, 'p) T.t) -> ('b, 'p) T.tval partition_tf :
('a, 'p) T.t ->
f:('a T.elt -> bool) ->
('a, 'p) T.t * ('a, 'p) T.tval partition_map :
('a, 'p) T.t ->
f:('a T.elt -> ('b T.elt, 'c T.elt) Base__.Either0.t) ->
('b, 'p) T.t * ('c, 'p) T.tinclude Container.Generic
with type 'a elt := 'a T.elt
with type ('a, 'phantom) t := ('a, 'phantom) T.t
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 optionval init : int -> f:(int -> 'a T.elt) -> ('a, _) T.tval filteri : ('a, 'p) T.t -> f:(int -> 'a T.elt -> bool) -> ('a, 'p) T.tval filter_mapi :
('a, 'p) T.t ->
f:(int -> 'a T.elt -> 'b T.elt option) ->
('b, 'p) T.tval concat_mapi :
('a, 'p) T.t ->
f:(int -> 'a T.elt -> ('b, 'p) T.t) ->
('b, 'p) T.t