package containers

  1. Overview
  2. Docs
type ('a, 'b) t = ('a * 'b) list
val get : ?eq:('a -> 'a -> bool) -> ('a, 'b) t -> 'a -> 'b option

Find the element

val get_exn : ?eq:('a -> 'a -> bool) -> ('a, 'b) t -> 'a -> 'b

Same as get

  • raises Not_found

    if the element is not present

val set : ?eq:('a -> 'a -> bool) -> ('a, 'b) t -> 'a -> 'b -> ('a, 'b) t

Add the binding into the list (erase it if already present)

OCaml

Innovation. Community. Security.