A dual of Monad, the framework of computing neighbor states in parallel.
All instances of the comonad c must satisfy the following laws:
c
x
c.extract(c.duplicate(x))
c.map(c.extract)(c.duplicate(x))
c.duplicate(c.duplicate(x))
c.map(c.duplicate)(c.duplicate(x))
Readonly
Computes the surrounding states from a source object wa.
wa
The wrapped object about type A.
A
The surrounding states of wa.
Extracts the internal state of type A.
The value of type A.
Maps the function fn onto F structure.
fn
F
The function to be mapped.
The mapped function.
Generated using TypeDoc
A dual of Monad, the framework of computing neighbor states in parallel.
All instances of the comonad
c
must satisfy the following laws:x
;c.extract(c.duplicate(x))
equals tox
,x
;c.map(c.extract)(c.duplicate(x))
equals tox
,x
;c.duplicate(c.duplicate(x))
equals toc.map(c.duplicate)(c.duplicate(x))
.