Module type Indexed_comonad.WITH_EXTEND

Minimal definition using extract and extend.

type ('a, 'index) t

The type held by the Indexed Comonad.

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

Extract a 'a from t. Dual of return.

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

Dual of bind.