aboutsummaryrefslogtreecommitdiff
path: root/lib/iStream.mli
diff options
context:
space:
mode:
Diffstat (limited to 'lib/iStream.mli')
-rw-r--r--lib/iStream.mli7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/iStream.mli b/lib/iStream.mli
index caae0ad35a..fd3fa6c503 100644
--- a/lib/iStream.mli
+++ b/lib/iStream.mli
@@ -31,7 +31,12 @@ val thunk : 'a t Lazy.t -> 'a t
val is_empty : 'a t -> bool
(** Whethere a stream is empty. *)
-val peek : 'a t -> ('a * 'a t) option
+type ('a,'r) peek =
+| Nil
+| Cons of 'a * 'r
+(** View type for {!peek} *)
+
+val peek : 'a t -> ('a , 'a t) peek
(** Return the head and the tail of a stream, if any. *)
(** {6 Standard operations}