Preface_specs.ComonadA Comonad is the dual of the Monad.
extend extract = id(extend %> extract) f = fextend g %> extend f = extend (extend g %> f)f =>= extract = fextract =>= f = f(f =>= g) =>= h = f =>= (g =>= h)extract <% duplicate = idfmap extract <% duplicate = idduplicate %> duplicate = fmap duplicate <% duplicateextend f = fmap f <% duplicateduplicate = extend idfmap f = extend (f <% extract)module type WITH_MAP_AND_DUPLICATE = sig ... endMinimal definition using extract, map and duplicate.
module type WITH_EXTEND = sig ... endMinimal definition using extract and extend.
module type WITH_COKLEISLI_COMPOSITION = sig ... endMinimal definition using extract and compose_left_to_right.
module type CORE = sig ... endBasis operations.
module type OPERATION = sig ... endAdditional operations.
module type SYNTAX = sig ... endSyntax extensions.
module type INFIX = sig ... endInfix operators.
module type API = sig ... endThe complete interface of a Comonad.
A standard representation of a comonad transformer. (It is likely that not all transformers respect this interface)
module type TRANSFORMER = sig ... end