package olinq

  1. Overview
  2. Docs
type !'a equal = 'a -> 'a -> bool
type !'a ord = 'a -> 'a -> int
type !'a hash = 'a -> int
type !'a sequence = ('a -> unit) -> unit
type (!'a, !+'b) t = private {
  1. is_empty : unit -> bool;
  2. size : unit -> int;
  3. get_exn : 'a -> 'b;
  4. iter : ('a -> 'b -> unit) -> unit;
  5. fold : 'c. ('c -> 'a -> 'b -> 'c) -> 'c -> 'c;
  6. choose : unit -> ('a * 'b) option;
}
type (!'a, !'b) map = ('a, 'b) t
val get : ('a, 'b) t -> 'a -> 'b option
val get_exn : ('a, 'b) t -> 'a -> 'b
val mem : ('a, 'b) t -> 'a -> bool
val size : ('a, 'b) t -> int
val to_seq : ('a, 'b) t -> ('a * 'b) sequence
val to_seq_multimap : ('a, 'b list) t -> ('a * 'b) sequence
val to_list : ('a, 'b) t -> ('a * 'b) list
val to_rev_list : ('a, 'b) t -> ('a * 'b) list
val fold : ('acc -> 'a -> 'b -> 'acc) -> 'acc -> ('a, 'b) t -> 'acc
val fold_multimap : ('acc -> 'a -> 'b -> 'acc) -> 'acc -> ('a, 'b list) t -> 'acc
val get_seq : 'a -> ('a, 'b) t -> 'b sequence
val iter : ('a, 'b) t -> ('a -> 'b -> unit) -> unit
val choose : ('a, 'b) t -> ('a * 'b) option
module Build : sig ... end
val of_seq : ?src:'a Build.src -> ('a * 'b) sequence -> ('a, 'b list) t
val of_list : ?src:'a Build.src -> ('a * 'b) list -> ('a, 'b list) t
val count_seq : ?src:'a Build.src -> 'a sequence -> ('a, int) t
val map : ('b -> 'c) -> ('a, 'b) t -> ('a, 'c) t
val reverse : ?src:'b Build.src -> ('a, 'b) t -> ('b, 'a list) t
val reverse_multimap : ?src:'b Build.src -> ('a, 'b list) t -> ('b, 'a list) t
val flatten : ('a, 'b sequence) t -> ('a * 'b) sequence
val flatten_l : ('a, 'b list) t -> ('a * 'b) sequence
OCaml

Innovation. Community. Security.