Computer Science ›› 2011, Vol. 38 ›› Issue (7): 144-147.

Previous Articles     Next Articles

Comonad Theory and its Applications in Functional Programming Language Haskell

SU Jin-dian,YU Shan-shan   

  • Online:2018-11-16 Published:2018-11-16

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

No related articles found!
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!