Computer Science ›› 2011, Vol. 38 ›› Issue (7): 144-147.
Previous Articles Next Articles
SU Jin-dian,YU Shan-shan
Online:
Published:
Abstract: Monad theory in functional programming language Haskell has some disadvantages in describing the context dependent computations. As the categorical dual notion of monads, comonad theory can effectively improve Haskell's description ability of context-dependent computations. Firstly, we gave the categorical definitions and properties of Comonads, as well as their implementations in Haskell. Secondly, we discussed the CoKleisli triple and CoKleisli category, and used some examples to demonstrate how to apply them into the descriptions and reasoning of context dependent computations. Finally, we also discussed the distributive laws between Comonads and Monads, and showed its uses in merging the effectful computations and context dependent computations.
Key words: Comonads,Functional programming,Haskcll,Context dependent computations,Category theory
SU Jin-dian,YU Shan-shan. Comonad Theory and its Applications in Functional Programming Language Haskell[J].Computer Science, 2011, 38(7): 144-147.
0 / / Recommend
Add to citation manager EndNote|Reference Manager|ProCite|BibTeX|RefWorks
URL: https://www.jsjkx.com/EN/
https://www.jsjkx.com/EN/Y2011/V38/I7/144
Cited