package containers

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
val get : 'a -> ('a, 'b) PMap.t t -> 'b t

Select a key from a map

val get_err : 'a -> ('a, 'b) PMap.t t -> 'b with_err t

Explicit version of get, with `Error if the key is not present

val iter : ('a, 'b) PMap.t t -> ('a * 'b) collection t

View a multimap as a proper collection

val flatten : ('a, 'b collection) PMap.t t -> ('a * 'b) collection t

View a multimap as a collection of individual key/value pairs

val flatten' : ('a, 'b list) PMap.t t -> ('a * 'b) collection t

View a multimap as a collection of individual key/value pairs

val map : ('b -> 'c) -> ('a, 'b) PMap.t t -> ('a, 'c) PMap.t t

Transform values

val to_list : ('a, 'b) PMap.t t -> ('a * 'b) list t
val reverse : ?cmp:'b ord -> ?eq:'b equal -> ?hash:'b hash -> unit -> ('a, 'b) PMap.t t -> ('b, 'a list) PMap.t t

Reverse relation of the map, as a multimap

val reverse_multimap : ?cmp:'b ord -> ?eq:'b equal -> ?hash:'b hash -> unit -> ('a, 'b list) PMap.t t -> ('b, 'a list) PMap.t t

Reverse relation of the multimap

val fold : ('acc -> 'a -> 'b -> 'acc) -> 'acc -> ('a, 'b) PMap.t t -> 'acc t

Fold on the items of the map

val fold_multimap : ('acc -> 'a -> 'b -> 'acc) -> 'acc -> ('a, 'b list) PMap.t t -> 'acc t

Fold on the items of the multimap

OCaml

Innovation. Community. Security.