开发者

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

开发者 https://www.devze.com 2023-02-11 04:36 出处:网络
Does anyone know how does the \"remove\" function from OCaml开发者_如何学编程\'s PriorityQueue library 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

精彩评论

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