Iterators
Compatible with the library "sequence". An iterator i
is simply a function that accepts another function f
(of type 'a -> unit
) and calls f
on a sequence of elements f x1; f x2; ...; f xn
.
type 'a t = ( 'a -> unit ) -> unit
val (<*>) : ( 'a -> 'b ) t -> 'a t -> 'b t
val (>>=) : 'a t -> ( 'a -> 'b t ) -> 'b t
val map : ( 'a -> 'b ) -> 'a t -> 'b t
val map2 : ( 'a -> 'b -> 'c ) -> 'a t -> 'b t -> 'c t
val (>|=) : 'a t -> ( 'a -> 'b ) -> 'b t
val append : 'a t -> 'a t -> 'a t
val (<+>) : 'a t -> 'a t -> 'a t
val of_list : 'a list -> 'a t
val of_array : 'a array -> 'a t
val pair : 'a t -> 'b t -> ('a * 'b) t
val triple : 'a t -> 'b t -> 'c t -> ('a * 'b * 'c) t
val quad : 'a t -> 'b t -> 'c t -> 'd t -> ('a * 'b * 'c * 'd) t
val find : ( 'a -> bool ) -> 'a t -> 'a option
val filter : ( 'a -> bool ) -> 'a t -> 'a t
val append_l : 'a t list -> 'a t
val flatten : 'a t t -> 'a t
val let+ : 'a t -> ( 'a -> 'b ) -> 'b t
val and+ : 'a t -> 'b t -> ('a * 'b) t
val let* : 'a t -> ( 'a -> 'b t ) -> 'b t
val and* : 'a t -> 'b t -> ('a * 'b) t