module Enum:sig
..end
This module defines enumerations. An enumeration is a lazy list where
accessing each element requires a (possibly dummy) asynchronous API call.
_s
when the function is monadic and calls are serialised_p
when the function is monadic and calls are parallelisedtype +'a
t
val empty : unit -> 'a t
val of_list : 'a list -> 'a t
val collapse : 'a t Call.t -> 'a t
val iter : ('a -> unit) -> 'a t -> unit Call.t
val iter_s : ('a -> unit Call.t) -> 'a t -> unit Call.t
val iter_p : ('a -> unit Call.t) -> 'a t -> unit Call.t
val map : ('a -> 'b) -> 'a t -> 'b t
val map_s : ('a -> 'b Call.t) -> 'a t -> 'b t
val map_p : ('a -> 'b Call.t) -> 'a t -> 'b t
val fold : ('a -> 'b -> 'a) -> 'a -> 'b t -> 'a Call.t
fold f accu enum
folds enum using f
. This is eager: the call evaluation
may trigger a lot of API calls at once, hence making it quite costly.val append : 'a t -> 'a t -> 'a t
val concat : 'a t t -> 'a t
val filter : ('a -> bool) -> 'a t -> 'a t
val filter_s : ('a -> bool Call.t) -> 'a t -> 'a t
val filter_map : ('a -> 'b option) -> 'a t -> 'b t
filter
and map
.val find : ('a -> bool) -> 'a t -> 'a option Call.t