diff --git a/src/libraries/utils/bag.mli b/src/libraries/utils/bag.mli index 181eaeea0f371acbf06c26bfcf7b90a3fbe70d4d..4c9e704b23f688969a974b6fca08e601ef9cc841 100644 --- a/src/libraries/utils/bag.mli +++ b/src/libraries/utils/bag.mli @@ -45,6 +45,10 @@ val fold_right : ('a -> 'b -> 'b) -> 'a t -> 'b -> 'b val find : ('a -> bool) -> 'a t -> 'a val find_opt : ('a -> bool) -> 'a t -> 'a option val find_map : ('a -> 'b option) -> 'a t -> 'b option +(** [find_map f b]: finds the first element [x] of the bag such + that [f x] returns [Some y], and returns [Some y]. If no such + element exists, returns None. +*) val exists : ('a -> bool) -> 'a t -> bool val for_all : ('a -> bool) -> 'a t -> bool