[sledge] Add Set.pop_min_elt_exn

Differential Revision: D29441151

fbshipit-source-id: b317d6458
master
Josh Berdine 3 years ago committed by Facebook GitHub Bot
parent ec8ba5aea3
commit 37aa0159ea

@ -75,6 +75,11 @@ struct
let choose_exn = S.choose
let pop = S.pop_opt
let pop_exn = S.pop
let pop_min_elt_exn s =
let min = S.min_elt s in
(min, S.remove min s)
let only_elt = S.only_elt
let classify = S.classify
let map s ~f = S.map f s

@ -88,6 +88,9 @@ module type S = sig
val pop_exn : t -> elt * t
(** Find and remove an unspecified element. [O(1)]. *)
val pop_min_elt_exn : t -> elt * t
(** Find and remove the minimum element. [O(1)]. *)
(** {1 Transform} *)
val map : t -> f:(elt -> elt) -> t

Loading…
Cancel
Save