Module Indexed_container.Make_gen_with_creators

Parameters

module T : sig ... end

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.t
val of_array : 'a T.elt array -> ('a, _) T.t
val append : ('a, 'p) T.t -> ('a, 'p) T.t -> ('a, 'p) T.t
val concat : (('a, 'p) T.t, 'p) T.concat -> ('a, 'p) T.t
val map : ('a, 'p) T.t -> f:('a T.elt -> 'b T.elt) -> ('b, 'p) T.t
val filter : ('a, 'p) T.t -> f:('a T.elt -> bool) -> ('a, 'p) T.t
val filter_map : ('a, 'p) T.t -> f:('a T.elt -> 'b T.elt option) -> ('b, 'p) T.t
val concat_map : ('a, 'p) T.t -> f:('a T.elt -> ('b, 'p) T.t) -> ('b, 'p) T.t
val partition_tf : ('a, 'p) T.t -> f:('a T.elt -> bool) -> ('a, 'p) T.t * ('a, 'p) T.t
val 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.t
include Container.Generic with type 'a elt := 'a T.elt with type ('a, 'phantom) t := ('a, 'phantom) T.t
val length : (_, _) T.t -> int
val is_empty : (_, _) T.t -> bool
val mem : ('a, _) T.t -> 'a T.elt -> equal:('a T.elt -> 'a T.elt -> bool) -> 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 fold_result : ('a, _) T.t -> init:'acc -> f:('acc -> 'a T.elt -> ('acc, 'e) Result.t) -> ('acc, 'e) Result.t
val fold_until : ('a, _) T.t -> init:'acc -> f:('acc -> 'a T.elt -> ('acc, 'final) Container.Continue_or_stop.t) -> finish:('acc -> 'final) -> 'final
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 sum : (module Container.Summable with type t = 'sum) -> ('a, _) T.t -> f:('a T.elt -> 'sum) -> 'sum
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
val min_elt : ('a, _) T.t -> compare:('a T.elt -> 'a T.elt -> int) -> 'a T.elt option
val max_elt : ('a, _) T.t -> compare:('a T.elt -> 'a T.elt -> int) -> 'a T.elt option

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
val init : int -> f:(int -> 'a T.elt) -> ('a, _) T.t
val mapi : ('a, 'p) T.t -> f:(int -> 'a T.elt -> 'b T.elt) -> ('b, 'p) T.t
val filteri : ('a, 'p) T.t -> f:(int -> 'a T.elt -> bool) -> ('a, 'p) T.t
val filter_mapi : ('a, 'p) T.t -> f:(int -> 'a T.elt -> 'b T.elt option) -> ('b, 'p) T.t
val concat_mapi : ('a, 'p) T.t -> f:(int -> 'a T.elt -> ('b, 'p) T.t) -> ('b, 'p) T.t