package grace

  1. Overview
  2. Docs

Source file hashtbl.ml

1
2
3
4
5
6
7
8
9
include Stdlib.Hashtbl

let find_or_add t key ~default =
  try find t key with
  | Not_found ->
    let value = default () in
    add t key value;
    value
;;