package tablecloth-base

  1. Overview
  2. Docs

Module Map.PolySource

Construct a Map which can be keyed by any data type using the polymorphic compare function.

Sourcetype identity
Sourcetype nonrec ('key, 'value) t = ('key, 'value, identity) t
Sourceval empty : unit -> ('key, 'value) t

A map with nothing in it.

Sourceval singleton : key:'key -> value:'value -> ('key, 'value) t

Create a map from a key and value.

Examples

Map.Poly.singleton ~key:false ~value:1 |> Map.to_list = [(false, 1)]
Sourceval from_array : ('key * 'value) array -> ('key, 'value) t

Create a map from an Array of key-value tuples.

Sourceval from_list : ('key * 'value) list -> ('key, 'value) t

Create a map from a List of key-value tuples.

OCaml

Innovation. Community. Security.