123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051(** [Monad_sequence.S] is a generic interface specifying functions that deal with a
container and a monad. It is specialized to the [Deferred] monad and used with
various containers in modules [Deferred.Array], [Deferred.List], [Deferred.Queue], and
[Deferred.Sequence]. The [Monad_sequence.how] type specifies the parallelism of
container iterators. *)open!Core_kernelopen!Importtypehow=[`Parallel(** like [`Max_concurrent_jobs Int.max_value] *)|`Sequential(** [`Sequential] is often but not always the same as [`Max_concurrent_jobs 1]
(for example, they differ in the [Or_error] monad). *)|`Max_concurrent_jobsofint][@@derivingsexp_of]moduletypeS=sigtype'amonadtype'atvalfoldi:'at->init:'b->f:(int->'b->'a->'bmonad)->'bmonadvalfold:'at->init:'b->f:('b->'a->'bmonad)->'bmonadvalfind:'at->f:('a->boolmonad)->'aoptionmonadvalfindi:'at->f:(int->'a->boolmonad)->(int*'a)optionmonadvalfind_map:'at->f:('a->'boptionmonad)->'boptionmonadvalfind_mapi:'at->f:(int->'a->'boptionmonad)->'boptionmonadvalexists:'at->f:('a->boolmonad)->boolmonadvalexistsi:'at->f:(int->'a->boolmonad)->boolmonadvalfor_all:'at->f:('a->boolmonad)->boolmonadvalfor_alli:'at->f:(int->'a->boolmonad)->boolmonadvalall:'amonadt->'atmonadvalall_unit:unitmonadt->unitmonad(** {2 Deferred iterators}
In the following, the default [how] is [`Sequential] *)valinit:?how:how->int->f:(int->'amonad)->'atmonadvaliter:?how:how->'at->f:('a->unitmonad)->unitmonadvaliteri:?how:how->'at->f:(int->'a->unitmonad)->unitmonadvalmap:?how:how->'at->f:('a->'bmonad)->'btmonadvalmapi:?how:how->'at->f:(int->'a->'bmonad)->'btmonadvalfilter:?how:how->'at->f:('a->boolmonad)->'atmonadvalfilteri:?how:how->'at->f:(int->'a->boolmonad)->'atmonadvalfilter_map:?how:how->'at->f:('a->'boptionmonad)->'btmonadvalfilter_mapi:?how:how->'at->f:(int->'a->'boptionmonad)->'btmonadvalconcat_map:?how:how->'at->f:('a->'btmonad)->'btmonadvalconcat_mapi:?how:how->'at->f:(int->'a->'btmonad)->'btmonadend