Module CCLinq.PMap

module PMap: sig .. end

Polymorphic Maps



type ('a, 'b) t 
val get : ('a, 'b) t -> 'a -> 'b option
val size : ('a, 'b) t -> int
val to_seq : ('a, 'b) t -> ('a * 'b) CCLinq.sequence
val map : ('b -> 'c) -> ('a, 'b) t -> ('a, 'c) t
Transform values
val to_list : ('a, 'b) t -> ('a * 'b) list
val reverse : ?cmp:'b CCLinq.ord ->
?eq:'b CCLinq.equal ->
?hash:'b CCLinq.hash ->
unit -> ('a, 'b) t -> ('b, 'a list) t
Reverse relation of the map, as a multimap
val reverse_multimap : ?cmp:'b CCLinq.ord ->
?eq:'b CCLinq.equal ->
?hash:'b CCLinq.hash ->
unit -> ('a, 'b list) t -> ('b, 'a list) t
Reverse relation of the multimap
val fold : ('acc -> 'a -> 'b -> 'acc) -> 'acc -> ('a, 'b) t -> 'acc
Fold on the items of the map
val fold_multimap : ('acc -> 'a -> 'b -> 'acc) -> 'acc -> ('a, 'b list) t -> 'acc
Fold on the items of the multimap
val get_seq : 'a -> ('a, 'b) t -> 'b CCLinq.sequence
Select a key from a map and wrap into sequence
val iter : ('a, 'b) t -> ('a * 'b) CCLinq.sequence
View a multimap as a proper collection
val flatten : ('a, 'b CCLinq.sequence) t -> ('a * 'b) CCLinq.sequence
View a multimap as a collection of individual key/value pairs
val flatten_l : ('a, 'b list) t -> ('a * 'b) CCLinq.sequence
View a multimap as a list of individual key/value pairs