【发布时间】:2019-06-19 11:44:15
【问题描述】:
Representable Store Comonad 和 Store Comonad 提供了类似的功能......我们什么时候应该使用其中一个,有什么好处?
【问题讨论】:
-
值得注意的是,在 Cats 中,例如
Store形式上只是一个专门的RepresentableStore(其中可表示的函子是I => _)。我不知道 Haskell 情况的细节,但我猜adjunction和comonad不这样做的唯一原因是历史原因。 -
感谢@TravisBrown!顺便说一句,Cats 中有一个讨论 PR 介绍 IndexedStore,是否应该在
RepresentableStore之上构建它,您可能会有一些有用的意见... -
感谢指点,没看到PR!
标签: scala haskell functional-programming scalaz comonad