[CCHeap] update comment delete_all

This commit is contained in:
Fardale 2018-01-28 12:36:37 +01:00
parent 4e9eeb50e5
commit 50d970852e
2 changed files with 10 additions and 4 deletions

View file

@ -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 *)

View file

@ -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