package minicaml

  1. Overview
  2. Docs
type ('a, 'b) t = ('a * 'b) list
val equal : 'a 'b. ('a -> 'a -> Ppx_deriving_runtime.bool) -> ('b -> 'b -> Ppx_deriving_runtime.bool) -> ('a, 'b) t -> ('a, 'b) t -> Ppx_deriving_runtime.bool
val compare : 'a 'b. ('a -> 'a -> Ppx_deriving_runtime.int) -> ('b -> 'b -> Ppx_deriving_runtime.int) -> ('a, 'b) t -> ('a, 'b) t -> Ppx_deriving_runtime.int
val dup_exists : 'a list -> bool

Search for duplicates

val empty : 'a -> 'b list

Generate an empty dictionary

Search for duplicates in a list of key-value pairs

val delete : 'a -> ('a * 'b) list -> ('a * 'b) list

Delete all occurrences of a key in a dictionary

val insert : ('a * 'b) list -> 'a -> 'b -> ('a * 'b) list

Insert a value into a key-value dictionary

val exists : 'a -> ('a * 'b) list -> bool

Check if a key exists in a list of key-value pairs

val get : 'a -> ('a * 'b) list -> 'b option

Search and get a key's value (first match) in a list of key-value pairs

val filter : 'a list -> ('a * 'b) list -> ('a * 'b) list
val getkeys : ('a * 'b) list -> 'a list
val getvalues : ('a * 'b) list -> 'b list
val insertmany : ('a * 'b) list -> 'a list -> 'b list -> ('a * 'b) list

Insert a list of keys and a list of values in a dictionary

OCaml

Innovation. Community. Security.