package base

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Indexed_container.Make_gen_with_creatorsSource

Parameters

module T : sig ... end

Signature

include Container.Generic_with_creators with type ('a, 'phantom1, 'phantom2) t := ('a, 'phantom1, 'phantom2) T.t with type 'a elt := 'a T.elt with type ('a, 'phantom1, 'phantom2) concat := ('a, 'phantom1, 'phantom2) T.concat
Sourceval of_list : 'a T.elt list -> ('a, _, _) T.t
Sourceval of_array : 'a T.elt array -> ('a, _, _) T.t
Sourceval append : ('a, 'p1, 'p2) T.t -> ('a, 'p1, 'p2) T.t -> ('a, 'p1, 'p2) T.t
Sourceval concat : (('a, 'p1, 'p2) T.t, 'p1, 'p2) T.concat -> ('a, 'p1, 'p2) T.t
Sourceval map : ('a, 'p1, 'p2) T.t -> f:('a T.elt -> 'b T.elt) -> ('b, 'p1, 'p2) T.t
Sourceval filter : ('a, 'p1, 'p2) T.t -> f:('a T.elt -> bool) -> ('a, 'p1, 'p2) T.t
Sourceval filter_map : ('a, 'p1, 'p2) T.t -> f:('a T.elt -> 'b T.elt option) -> ('b, 'p1, 'p2) T.t
Sourceval concat_map : ('a, 'p1, 'p2) T.t -> f:('a T.elt -> ('b, 'p1, 'p2) T.t) -> ('b, 'p1, 'p2) T.t
Sourceval partition_tf : ('a, 'p1, 'p2) T.t -> f:('a T.elt -> bool) -> ('a, 'p1, 'p2) T.t * ('a, 'p1, 'p2) T.t
Sourceval partition_map : ('a, 'p1, 'p2) T.t -> f:('a T.elt -> ('b T.elt, 'c T.elt) Base__.Either0.t) -> ('b, 'p1, 'p2) T.t * ('c, 'p1, 'p2) T.t
include Container.Generic with type 'a elt := 'a T.elt with type ('a, 'phantom1, 'phantom2) t := ('a, 'phantom1, 'phantom2) T.t
Sourceval length : (_, _, _) T.t -> int
Sourceval is_empty : (_, _, _) T.t -> bool
Sourceval mem : ('a, _, _) T.t -> 'a T.elt -> equal:('a T.elt -> 'a T.elt -> bool) -> bool
Sourceval iter : ('a, _, _) T.t -> f:('a T.elt -> unit) -> unit
Sourceval fold : ('a, _, _) T.t -> init:'acc -> f:('acc -> 'a T.elt -> 'acc) -> 'acc
Sourceval fold_result : ('a, _, _) T.t -> init:'acc -> f:('acc -> 'a T.elt -> ('acc, 'e) Result.t) -> ('acc, 'e) Result.t
Sourceval fold_until : ('a, _, _) T.t -> init:'acc -> f:('acc -> 'a T.elt -> ('acc, 'final) Container.Continue_or_stop.t) -> finish:('acc -> 'final) -> 'final
Sourceval exists : ('a, _, _) T.t -> f:('a T.elt -> bool) -> bool
Sourceval for_all : ('a, _, _) T.t -> f:('a T.elt -> bool) -> bool
Sourceval count : ('a, _, _) T.t -> f:('a T.elt -> bool) -> int
Sourceval sum : (module Container.Summable with type t = 'sum) -> ('a, _, _) T.t -> f:('a T.elt -> 'sum) -> 'sum
Sourceval find : ('a, _, _) T.t -> f:('a T.elt -> bool) -> 'a T.elt option
Sourceval find_map : ('a, _, _) T.t -> f:('a T.elt -> 'b option) -> 'b option
Sourceval to_list : ('a, _, _) T.t -> 'a T.elt list
Sourceval to_array : ('a, _, _) T.t -> 'a T.elt array
Sourceval min_elt : ('a, _, _) T.t -> compare:('a T.elt -> 'a T.elt -> int) -> 'a T.elt option
Sourceval 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.

Sourceval foldi : ('a, _, _) T.t -> init:_ -> f:(int -> _ -> 'a T.elt -> _) -> _
Sourceval iteri : ('a, _, _) T.t -> f:(int -> 'a T.elt -> unit) -> unit
Sourceval existsi : ('a, _, _) T.t -> f:(int -> 'a T.elt -> bool) -> bool
Sourceval for_alli : ('a, _, _) T.t -> f:(int -> 'a T.elt -> bool) -> bool
Sourceval counti : ('a, _, _) T.t -> f:(int -> 'a T.elt -> bool) -> int
Sourceval findi : ('a, _, _) T.t -> f:(int -> 'a T.elt -> bool) -> (int * 'a T.elt) option
Sourceval find_mapi : ('a, _, _) T.t -> f:(int -> 'a T.elt -> 'b option) -> 'b option
Sourceval init : int -> f:(int -> 'a T.elt) -> ('a, _, _) T.t
Sourceval mapi : ('a, 'p1, 'p2) T.t -> f:(int -> 'a T.elt -> 'b T.elt) -> ('b, 'p1, 'p2) T.t
Sourceval filteri : ('a, 'p1, 'p2) T.t -> f:(int -> 'a T.elt -> bool) -> ('a, 'p1, 'p2) T.t
Sourceval filter_mapi : ('a, 'p1, 'p2) T.t -> f:(int -> 'a T.elt -> 'b T.elt option) -> ('b, 'p1, 'p2) T.t
Sourceval concat_mapi : ('a, 'p1, 'p2) T.t -> f:(int -> 'a T.elt -> ('b, 'p1, 'p2) T.t) -> ('b, 'p1, 'p2) T.t