Module type Indexed_comonad.CORE

Basis operations.

type ('a, 'index) t

The type held by the Indexed Comonad.

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

Dual of join.

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

Mapping over t from 'a to 'b.

val extend : (('a, 'index) t -> 'b) -> ('a, 'index) t -> ('b, 'index) t

Dual of bind.

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

Extract a 'a from t. Dual of return.

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

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