[sledge] Add Qset.is_empty

Reviewed By: jvillard

Differential Revision: D20663962

fbshipit-source-id: a0d23d4fc
master
Josh Berdine 5 years ago committed by Facebook GitHub Bot
parent 165454e17d
commit b09f3774a4

@ -71,6 +71,7 @@ struct
M.fold m' ~init:m ~f:(fun ~key:x ~data:i m -> add m x i)
let map_counts m ~f = M.mapi ~f:(fun ~key ~data -> f key data) m
let is_empty = M.is_empty
let length m = M.length m
let count m x = match M.find m x with Some q -> q | None -> Q.zero
let choose = M.choose

@ -43,6 +43,8 @@ module type S = sig
(* queries *)
val is_empty : t -> bool
val length : t -> int
(** Number of elements with non-zero multiplicity. [O(1)]. *)

Loading…
Cancel
Save