Bind.Over_functor_via_kleisli_composition
module Functor : Preface_specs.Functor.WITH_MAP
module Req : Preface_specs.Bind.WITH_KLEISLI_COMPOSITION with type 'a t = 'a Functor.t
type 'a t = 'a Req.t
The type held by the Bind
.
join
remove one level of monadic structure, projecting its bound argument into the outer level.
Composing monadic functions using Kleisli Arrow (from left to right).
Composing monadic functions using Kleisli Arrow (from right to left).
Lift a binary function that acts on arbitrary values into a function that acts t
values.
Lift a ternary function that acts on arbitrary values into a function that acts t
values.
Create a new t
, replacing all values of the given functor by given a value of 'a
.
module Infix :
Preface_specs.Indexed_bind.INFIX with type ('a, 'index) t := 'a t
Infix 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 CORE
.map.
Flipped and infix version of CORE
.map.
Flipped and infix version of OPERATION
.replace.
module Syntax :
Preface_specs.Indexed_bind.SYNTAX with type ('a, 'index) t := 'a t
Syntactic shortcuts for flipped version of CORE
.bind:
let* x = e in f
is equals to bind (fun x -> f) e
.