package preface
Module Monad.From_monad_plus
Parameters
module Monad_plus : Preface_specs.MONAD_PLUSSignature
Type
type 'a t = 'a Monad_plus.tThe type held by the Monad.
Functions
join remove one level of monadic structure, projecting its bound argument into the outer level.
val return : 'a -> 'a tCreate a new 'a t.
Composing monadic functions using Kleisli Arrow (from left to right).
Composing monadic functions using Kleisli Arrow (from right to left).
Mapping over from 'a and 'b to 'c over 'a t and 'b t to 'c t.
Mapping over from 'a and 'b and 'c to 'd over 'a t and 'b t and 'c t to 'd t.
Create a new 'a t, replacing all values in the 'b t by given a value of 'a.
Infix operators
module Infix : Preface_specs.Monad.INFIX with type 'a t := 'a tInfix version of OPERATION.compose_right_to_left.
Sequentially compose two actions, discarding any value produced by the first.
Sequentially compose two actions, discarding any value produced by the second.
Infix version of Preface_specs.Functor.CORE.map.
Flipped and infix version of Preface_specs.Functor.CORE.map.
Infix version of Preface_specs.Functor.OPERATION.replace.
Flipped and infix version of Preface_specs.Functor.OPERATION.replace.
Syntax
module Syntax : Preface_specs.Monad.SYNTAX with type 'a t := 'a tSyntaxic shortcuts for flipped version of CORE.bind:
let* x = e in f is equals to bind (fun x -> f) e.