Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- open Base
- let hash_equal (h1: ('a, 'b) Hashtbl.t) (h2: ('a, 'b) Hashtbl.t) : bool =
- if Hashtbl.length h1 <> Hashtbl.length h2 then false
- else Hashtbl.for_alli
- ~f:(fun ~key ~data ->
- if Hashtbl.mem h1 key then
- match Hashtbl.find h2 key with
- | Some data_ -> if d = data then true else false
- | None -> false
- else false
- )
- h2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement