Commit eb496c39 authored by Adrien KOUTSOS's avatar Adrien KOUTSOS

added missing file

parent 036366ad
Pipeline #1662 passed with stage
in 1 minute and 30 seconds
module Mem (M:Hashtbl.HashedType) : sig
val make : (M.t -> 'a) -> M.t -> 'a
val make2 : ('b -> M.t -> 'a) -> 'b -> M.t -> 'a
end = struct
module H = Ephemeron.K1.Make(M)
let make f =
let h = H.create 256 in
fun x -> try H.find h x with
| Not_found ->
let y = f x in
H.add h x y;
y
let make2 f =
let h = H.create 256 in
fun e x -> try H.find h x with
| Not_found ->
let y = f e x in
H.add h x y;
y
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment