diff --git a/infer/src/istd/IContainer.ml b/infer/src/istd/IContainer.ml index 9d13b874d..63e0fb344 100644 --- a/infer/src/istd/IContainer.ml +++ b/infer/src/istd/IContainer.ml @@ -4,7 +4,6 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. *) -(* Extension of Base.Container, i.e. generic definitions of container operations in terms of fold. *) open! IStd module F = Format @@ -17,8 +16,6 @@ let singleton_or_more ~fold t = match acc with Empty -> Singleton item | _ -> return More ) ) -let is_singleton ~fold t = match singleton_or_more ~fold t with Singleton _ -> true | _ -> false - let mem_nth ~fold t index = With_return.with_return (fun {return} -> let (_ : int) = diff --git a/infer/src/istd/IContainer.mli b/infer/src/istd/IContainer.mli index 8ef107eba..325ca975f 100644 --- a/infer/src/istd/IContainer.mli +++ b/infer/src/istd/IContainer.mli @@ -8,16 +8,14 @@ open! IStd module F = Format +(** Extension of {!Base.Container}, i.e. generic definitions of container operations in terms of a + [fold] function. *) + type 'a singleton_or_more = Empty | Singleton of 'a | More val singleton_or_more : fold:('t, 'a, 'a singleton_or_more) Container.fold -> 't -> 'a singleton_or_more -(* O(1) *) - -val is_singleton : fold:('t, 'a, 'a singleton_or_more) Container.fold -> 't -> bool - [@@warning "-32"] - val mem_nth : fold:('t, _, int) Container.fold -> 't -> int -> bool val forto : (int, int, 'accum) Container.fold