diff --git a/src/core/CCHeap.ml b/src/core/CCHeap.ml index 4917db07..b85ce53f 100644 --- a/src/core/CCHeap.ml +++ b/src/core/CCHeap.ml @@ -119,8 +119,11 @@ module type S = sig @raise Empty if the heap is empty *) val delete_all : (elt -> elt -> bool) -> elt -> t -> t - (** Delete value if it exist in the heap. - [delete_all eq x h], use [eq] to find all [x] in [h] and delete them *) + (** Delete all occurrences of a value in the heap. + [delete_all eq x h], use [eq] to find all [x] in [h] and delete them. + If [h] do not contain [x] then it return [h]. + The difference with {!filter} is that [delete_all] stops as soon as + it enters a subtree whose root is bigger than the element *) val iter : (elt -> unit) -> t -> unit (** Iterate on elements *) diff --git a/src/core/CCHeap.mli b/src/core/CCHeap.mli index dca9f91e..ac320aef 100644 --- a/src/core/CCHeap.mli +++ b/src/core/CCHeap.mli @@ -56,8 +56,11 @@ module type S = sig @raise Empty if the heap is empty *) val delete_all : (elt -> elt -> bool) -> elt -> t -> t - (** Delete value if it exist in the heap. - [delete_all eq x h], use [eq] to find all [x] in [h] and delete them + (** Delete all occurrences of a value in the heap. + [delete_all eq x h], use [eq] to find all [x] in [h] and delete them. + If [h] do not contain [x] then it return [h]. + The difference with {!filter} is that [delete_all] stops as soon as + it enters a subtree whose root is bigger than the element @since NEXT_RELEASE *) val iter : (elt -> unit) -> t -> unit