mirror of
https://github.com/c-cube/iter.git
synced 2025-12-06 03:05:29 -05:00
creation of the empty sequence
This commit is contained in:
parent
099b0bbb8d
commit
d64691f1b3
2 changed files with 5 additions and 0 deletions
|
|
@ -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 *)
|
||||
|
|
|
|||
|
|
@ -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 *)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue