creation of the empty sequence

This commit is contained in:
Simon Cruanes 2013-02-18 17:23:56 +01:00
parent 099b0bbb8d
commit d64691f1b3
2 changed files with 5 additions and 0 deletions

View file

@ -31,6 +31,8 @@ type 'a t = ('a -> unit) -> unit
(** Build a sequence from a iter function *)
let from_iter f = f
let empty = fun k -> ()
let singleton x = fun k -> k x
(** Infinite sequence of the same element *)

View file

@ -36,6 +36,9 @@ type +'a t
val from_iter : (('a -> unit) -> unit) -> 'a t
(** Build a sequence from a iter function *)
val empty : 'a t
(** Empty sequence *)
val singleton : 'a -> 'a t
(** Singleton sequence *)