[Haskell-cafe] Foldable for (,)

MarLinn monkleyon at gmail.com
Wed May 3 19:12:20 UTC 2017


On 2017-05-03 20:35, Dmitry Olshansky wrote:
> So I don't know an answer... Really, why we have this constraint? The 
> same question is about Functor.

Functor is easy:

instance Traversable f => Functor f where
     fmap = (runIdentity .) . traverse . (pure .)


More information about the Haskell-Cafe mailing list