package containers

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Maps with Heterogeneous Values

status: experimental

  • since 0.9
type 'a injection

An accessor for values of type 'a in any map. Values put in the map using an key can only be retrieved using this very same key.

val create_inj : unit -> 'a injection

Return a value that works for a given type of values. This function is normally called once for each type of value. Several keys may be created for the same type, but a value set with a given setter can only be retrieved with the matching getter. The same key can be reused across multiple maps (although not in a thread-safe way).

module type S = sig ... end
module type ORD = sig ... end
module Make (X : ORD) : S with type key = X.t
OCaml

Innovation. Community. Security.