Module Bind.Core_over_functor_via_bind

Parameters

module Req : Preface_specs.Bind.WITH_BIND with type 'a t = 'a Functor.t

Signature

type 'a t = 'a Req.t

The type held by the Bind.

val bind : ('a -> 'b t) -> 'a t -> 'b t

bind f m passes the result of computation m to function f.

val map : ('a -> 'b) -> 'a t -> 'b t

Mapping over from 'a to 'b.

val join : 'a t t -> 'a t

join remove one level of monadic structure, projecting its bound argument into the outer level.

val compose_left_to_right : ('a -> 'b t) -> ('b -> 'c t) -> 'a -> 'c t

Composing monadic functions using Kleisli Arrow (from left to right).