package gen

  1. Overview
  2. Docs

Module type GenM_intf.SSource

Sourcemodule M : MONAD
Sourcetype +'a t = unit -> 'a option M.t

A value of type 'a t is an iterator over values of type 'a that live in the monad M.t. For instance, if M is Lwt, accessing each element might require some IO operation (reading a file, etc.)

Sourceval return : 'a -> 'a t
Sourceval sequence_m : 'a M.t gen -> 'a t

From a generator of actions, return an effectful generator

Sourceval map : ('a -> 'b) -> 'a t -> 'b t
Sourceval flat_map : ('a -> 'b t) -> 'a t -> 'b t
Sourceval fold : ('a -> 'b -> 'a) -> 'a -> 'b t -> 'a M.t
Sourceval fold_m : ('a -> 'b -> 'a M.t) -> 'a -> 'b t -> 'a M.t
Sourceval iter : ('a -> unit) -> 'a t -> unit M.t
Sourceval iter_s : ('a -> unit M.t) -> 'a t -> unit M.t
Sourceval iter_p : ('a -> unit M.t) -> 'a t -> unit M.t
Sourcemodule Infix : sig ... end
include module type of Infix
Sourceval (>>=) : 'a t -> ('a -> 'b t) -> 'b t
Sourceval (>|=) : 'a t -> ('a -> 'b) -> 'b t
OCaml

Innovation. Community. Security.