Add Univ_map.singleton

Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
This commit is contained in:
Jeremie Dimino 2018-06-19 14:05:19 +01:00
parent 3e2567d2c7
commit 0e6986c2f2
2 changed files with 2 additions and 0 deletions

View File

@ -71,3 +71,4 @@ let find_exn t key =
let eq = Key.eq key' key in
Eq.cast eq v
let singleton key v = Int.Map.singleton (Key.id key) (Binding.T (key, v))

View File

@ -17,3 +17,4 @@ val add : t -> 'a Key.t -> 'a -> t
val remove : t -> 'a Key.t -> t
val find : t -> 'a Key.t -> 'a option
val find_exn : t -> 'a Key.t -> 'a
val singleton : 'a Key.t -> 'a -> t