@MISC{Uustalu_chapter9, author = {Tarmo Uustalu and Varmo Vene}, title = {Chapter 9 The Dual of Substitution is}, year = {} }
Bookmark
OpenURL
Abstract
Abstract: It is well known that type constructors of incomplete trees (trees with variables) carry the structure of a monad with substitution as the extension operation. Less known are the facts that the same is true of type constructors of incomplete cotrees (=non-wellfounded trees) and that the corresponding monads exhibit a special structure. We wish to draw attention to the dual facts which are as meaningful for functional programming: type constructors of decorated cotrees carry the structure of a comonad with redecoration as the coextension operation, and so do—even more interestingly—type constructors of decorated trees. The developments in both language design and programming methodology for functional programming have repeatedly demonstrated the usefulness of categorytheory insights in the construction and organization of programming idioms. A good example is given in the categorical notions of monad and comonad: these