From 8c2cb3f24499487fb5e9ccff85c34847a084d41a Mon Sep 17 00:00:00 2001 From: Fardale Date: Sun, 28 Jan 2018 12:39:44 +0100 Subject: [PATCH] [CCHeap] delete_once -> delete_one --- src/core/CCHeap.ml | 6 +++--- src/core/CCHeap.mli | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/core/CCHeap.ml b/src/core/CCHeap.ml index 238186e0..42949926 100644 --- a/src/core/CCHeap.ml +++ b/src/core/CCHeap.ml @@ -118,9 +118,9 @@ module type S = sig (** Same as {!take}, but can fail. @raise Empty if the heap is empty *) - val delete_once : (elt -> elt -> bool) -> elt -> t -> t + val delete_one : (elt -> elt -> bool) -> elt -> t -> t (** Delete one occurence of a value if it exist in the heap. - [delete_once eq x h], use [eq] to find one [x] in [h] and delete it. + [delete_one eq x h], use [eq] to find one [x] in [h] and delete it. If [h] do not contain [x] then it return [h]. *) val delete_all : (elt -> elt -> bool) -> elt -> t -> t @@ -255,7 +255,7 @@ module Make(E : PARTIAL_ORD) : S with type elt = E.t = struct | E -> raise Empty | N (_, x, l, r) -> merge l r, x - let delete_once eq x h = + let delete_one eq x h = let rec aux = function | E -> false, E | N(_, y, l, r) as h -> begin diff --git a/src/core/CCHeap.mli b/src/core/CCHeap.mli index d47a6899..6e8ae7f2 100644 --- a/src/core/CCHeap.mli +++ b/src/core/CCHeap.mli @@ -55,9 +55,9 @@ module type S = sig (** Same as {!take}, but can fail. @raise Empty if the heap is empty *) - val delete_once : (elt -> elt -> bool) -> elt -> t -> t + val delete_one : (elt -> elt -> bool) -> elt -> t -> t (** Delete one occurence of a value if it exist in the heap. - [delete_once eq x h], use [eq] to find one [x] in [h] and delete it. + [delete_one eq x h], use [eq] to find one [x] in [h] and delete it. If [h] do not contain [x] then it return [h]. @since NEXT_RELEASE *)