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!
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 -> ()
精彩评论