package mechaml

  1. Overview
  2. Docs

Module Monad.ListSource

The List module wraps the functions of the Lwt_list module inside the Agent monad. Functions suffixed with _s chain the actions sequentially, passing around the updated agent from an action to the next one. The functions suffixed with _m do everything in parallel, using a copy of the initial state in every thread and returning this same original state. The latter can be useful to retrieve a bunch of resources in batch where the updated state is not of interest (e.g download images)

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

Innovation. Community. Security.