diff --git a/core/CCFQueue.ml b/core/CCFQueue.ml index 37420428..41df1639 100644 --- a/core/CCFQueue.ml +++ b/core/CCFQueue.ml @@ -56,6 +56,9 @@ let is_empty = function | Shallow Zero -> true | _ -> false +let singleton x = _single x +let doubleton x y = _double x y + let _empty = Lazy.from_val empty let rec cons : 'a. 'a -> 'a t -> 'a t diff --git a/core/CCFQueue.mli b/core/CCFQueue.mli index 55736b7a..397155c1 100644 --- a/core/CCFQueue.mli +++ b/core/CCFQueue.mli @@ -38,6 +38,10 @@ val empty : 'a t val is_empty : 'a t -> bool +val singleton : 'a -> 'a t + +val doubleton : 'a -> 'a -> 'a t + exception Empty val cons : 'a -> 'a t -> 'a t