Module type Comonad.WITH_MAP_AND_DUPLICATE

Minimal definition using extract, map and duplicate.

type 'a t

The type held by the Comonad.

val extract : 'a t -> 'a

Extract a 'a from ('a, 'index) t. Dual of return.

val duplicate : 'a t -> 'a t t

Dual of join.

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

Mapping over t from 'a to 'b.