Parameter Via.Core

type ('a, 'index) t

The type held by the Indexed Monad.

include Preface_specs.Indexed_monad.WITH_RETURN with type ('a, 'index) t := ('a, 'index) t
include Preface_specs.Indexed_bind.WITH_BIND with type ('a, 'index) t := ('a, 'index) t
val bind : ('a -> ('b, 'index) t) -> ('a, 'index) t -> ('b, 'index) t

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

include Preface_specs.Indexed_monad.WITH_RETURN with type ('a, 'index) t := ('a, 'index) t
include Preface_specs.Indexed_bind.WITH_MAP_AND_JOIN with type ('a, 'index) t := ('a, 'index) t
val map : ('a -> 'b) -> ('a, 'index) t -> ('b, 'index) t

Mapping over from 'a to 'b.

val join : (('a, 'index) t, 'index) t -> ('a, 'index) t

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

include Preface_specs.Indexed_monad.WITH_RETURN with type ('a, 'index) t := ('a, 'index) t
val return : 'a -> ('a, 'index) t

Lift a value into a t.

include Preface_specs.Indexed_bind.WITH_KLEISLI_COMPOSITION with type ('a, 'index) t := ('a, 'index) t
val compose_left_to_right : ('a -> ('b, 'index) t) -> ('b -> ('c, 'index) t) -> 'a -> ('c, 'index) t

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