Pete resume for codata (where comonad is a "type of input impurity")

In terms of meaningful summaries - this description of Comonads seems to be winning - describing them as a "type of input impurity."

What is the equivalent meaningful (one sentence) description for codata?

+2
source share
1 answer

"Codata are types populated by values โ€‹โ€‹that can be infinite."

This contrasts with the โ€œdataโ€, which are populated only by finite values. For example, if we take the definition of โ€œdataโ€ of lists, it is populated with lists of finite length (as in ML), but if we take the definition of โ€œcodataโ€, it will be populated as infinite (as in Haskell, for example x = 1 : x ).

Komonads and codates are not necessarily related (although perhaps some may think of this because of the article by Kiburz Comonads and codata in Haskell ).

0
source

Source: https://habr.com/ru/post/1491105/


All Articles