package riot

  1. Overview
  2. Docs

Riot's Hashmap is a process-safe implementation of a hash-table.

type ('k, 'v) t
val create : ?size:int -> unit -> ('k, 'v) t
val get : ('k, 'v) t -> 'k -> 'v option
val get_all : ('k, 'v) t -> 'k -> 'v list
val is_empty : ('k, 'v) t -> bool
val find_by : ('k, 'v) t -> (('k * 'v) -> bool) -> ('k * 'v) option
val remove : ('k, 'v) t -> 'k -> unit
val remove_all : ('k, 'v) t -> 'k list -> unit
val find_all_by : ('k, 'v) t -> (('k * 'v) -> bool) -> ('k * 'v) list
val has_key : ('k, 'v) t -> 'k -> bool
val insert : ('k, 'v) t -> 'k -> 'v -> unit
val remove_by : ('k, 'v) t -> (('k * 'v) -> bool) -> unit
val replace : ('k, 'v) t -> 'k -> 'v -> unit
val iter : ('k, 'v) t -> (('k * 'v) -> unit) -> unit
val pp : (Stdlib.Format.formatter -> 'k -> unit) -> Stdlib.Format.formatter -> ('k, 'v) t -> unit
module type Base = sig ... end
module type Intf = sig ... end
module Make (B : Base) : Intf with type key = B.key
OCaml

Innovation. Community. Security.