package monadlib

  1. Overview
  2. Docs

Module Monad.MakeWriter

A writer which combines the output values using some plus operation.

Parameters

module M : Monoid

Signature

include Writer with type t = M.t
type t = M.t
include BatInterfaces.Monad
type 'a m
val bind : 'a m -> ('a -> 'b m) -> 'b m
val return : 'a -> 'a m
val listen : 'a m -> (t * 'a) m

Listen to the written value.

val run : 'a m -> t * 'a

Run the writer, extracting both outputs.

val write : t -> unit m

Write a value.

OCaml

Innovation. Community. Security.