package mechaml

  1. Overview
  2. Docs

The List module mainly wrap the Lwt_list one in the Agent monad. Functions suffixed with _s chains the actions sequentially, passing around the updated agent to the next one. The _m ones do everything in parallel, sending a copy of the initial state to every threads and returning this same unupdated state. The latter can be useful to retrive a bunch of ressources in batch where the updated state is not of interest (e.g images)

val iter_s : ('a -> unit m) -> 'a list -> unit m
val iter_p : ('a -> unit m) -> 'a list -> unit m
val iteri_s : (int -> 'a -> unit m) -> 'a list -> unit m
val iteri_p : (int -> 'a -> unit m) -> 'a list -> unit m
val map_s : ('a -> 'b m) -> 'a list -> 'b list m
val map_p : ('a -> 'b m) -> 'a list -> 'b list m
val mapi_s : (int -> 'a -> 'b m) -> 'a list -> 'b list m
val mapi_p : (int -> 'a -> 'b m) -> 'a list -> 'b list m
val fold_left_s : ('a -> 'b -> 'a m) -> 'a -> 'b list -> 'a m
val fold_right_s : ('a -> 'b -> 'b m) -> 'a list -> 'b -> 'b m
OCaml

Innovation. Community. Security.