开发者

(OCaml) How does "remove" function from OCaml's PriorityQueue look like?

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 -> ()
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜