mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2026-01-28 20:04:51 -05:00
constructors for 1 or 2 elements fqueues
This commit is contained in:
parent
abef0be6bd
commit
1b98749c65
2 changed files with 7 additions and 0 deletions
|
|
@ -56,6 +56,9 @@ let is_empty = function
|
||||||
| Shallow Zero -> true
|
| Shallow Zero -> true
|
||||||
| _ -> false
|
| _ -> false
|
||||||
|
|
||||||
|
let singleton x = _single x
|
||||||
|
let doubleton x y = _double x y
|
||||||
|
|
||||||
let _empty = Lazy.from_val empty
|
let _empty = Lazy.from_val empty
|
||||||
|
|
||||||
let rec cons : 'a. 'a -> 'a t -> 'a t
|
let rec cons : 'a. 'a -> 'a t -> 'a t
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,10 @@ val empty : 'a t
|
||||||
|
|
||||||
val is_empty : 'a t -> bool
|
val is_empty : 'a t -> bool
|
||||||
|
|
||||||
|
val singleton : 'a -> 'a t
|
||||||
|
|
||||||
|
val doubleton : 'a -> 'a -> 'a t
|
||||||
|
|
||||||
exception Empty
|
exception Empty
|
||||||
|
|
||||||
val cons : 'a -> 'a t -> 'a t
|
val cons : 'a -> 'a t -> 'a t
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue