Reputation: 1949
Does anyone know how does the "remove" function from OCaml's PriorityQueue library look like?
I know how it works but I just wanna see the code.
Thanks!
Upvotes: 2
Views: 342
Reputation: 6681
I suppose you're talking about the PriorityQueue module from Holger Arnold's ocaml-base library? Just look at the source, it's this:
let remove h x =
try remove_index h (Hashtbl.find h.indices x)
with Not_found -> ()
Upvotes: 1