JUCS - Journal of Universal Computer Science 11(7): 1310-1326, doi: 10.3217/jucs-011-07-1311
Signals and Comonads
expand article infoTarmo Uustalu, Tarmo Vene§
‡ Tallinn University of Technology, Tallinn, Estonia§ Department of Computer Science, University of Tartu, Estonia
Open Access
Abstract
We propose a novel discipline for programming stream functions and for the semantic description of stream manipulation languages based on the observation that both general and causal stream functions can be characterized as coKleisli arrows of comonads. This seems to be a promising application for the old, but very little exploited idea that if monads abstract notions of computation of a value, comonads ought to be useable as an abstraction of notions of value in a context. We also show that causal partial-stream functions can be described in terms of a combination of a comonad and a monad.
Keywords
comonads, distributive laws, stream functions, dataflow computation