mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 11:15:31 -05:00
[CCHeap] update comment delete_all
This commit is contained in:
parent
4e9eeb50e5
commit
50d970852e
2 changed files with 10 additions and 4 deletions
|
|
@ -119,8 +119,11 @@ module type S = sig
|
||||||
@raise Empty if the heap is empty *)
|
@raise Empty if the heap is empty *)
|
||||||
|
|
||||||
val delete_all : (elt -> elt -> bool) -> elt -> t -> t
|
val delete_all : (elt -> elt -> bool) -> elt -> t -> t
|
||||||
(** Delete value if it exist in the heap.
|
(** 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 *)
|
[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
|
val iter : (elt -> unit) -> t -> unit
|
||||||
(** Iterate on elements *)
|
(** Iterate on elements *)
|
||||||
|
|
|
||||||
|
|
@ -56,8 +56,11 @@ module type S = sig
|
||||||
@raise Empty if the heap is empty *)
|
@raise Empty if the heap is empty *)
|
||||||
|
|
||||||
val delete_all : (elt -> elt -> bool) -> elt -> t -> t
|
val delete_all : (elt -> elt -> bool) -> elt -> t -> t
|
||||||
(** Delete value if it exist in the heap.
|
(** 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
|
[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 *)
|
@since NEXT_RELEASE *)
|
||||||
|
|
||||||
val iter : (elt -> unit) -> t -> unit
|
val iter : (elt -> unit) -> t -> unit
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue