问题描述
用精巧的摘要表示-对Comonads的描述似乎很成功-将它们描述为输入杂质的类型" '.
In terms of pithy summaries - this description of Comonads seems to win - describing them as a 'type for input impurity'.
codata的等效精简(单句)描述是什么?
What is an equivalent pithy (one-sentence) description for codata?
推荐答案
"Codata是可能由无限值占据的类型"
"Codata are types inhabited by values that may be infinite"
这与仅由有限值占据的数据"形成对比.例如,如果我们使用列表的数据"定义,那么它就被有限长度的列表所占据(如ML中一样),但是如果我们使用"codata"的定义,它也就被无限的也所占据了长度列表(例如Haskell中的x = 1 : x
).
This contrasts with "data" which is inhabited only by finite values. For example, if we take the "data" definition of lists, it is inhabited by lists of finite length (as in ML), but if we take the "codata" definition it is inhabited also by infinite length lists (as in Haskell, e.g. x = 1 : x
).
comonads和codata不一定相关(尽管由于Kieburtz的论文 Haskell中的彗星和协同数据).
Comonads and codata are not necessarily related (although perhaps some might think so due to Kieburtz' paper Comonads and codata in Haskell).
这篇关于Codata的简要总结(其中comonad是“输入杂质的类型")的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!