ekmett / distributive

Dual Traversable
http://hackage.haskell.org/package/distributive
Other
41 stars 25 forks source link

document laws? #29

Closed matthewleon closed 7 years ago

matthewleon commented 7 years ago

I see on this reddit thread that you've listed two laws: https://www.reddit.com/r/haskell/comments/4cmjeg/a_law_for_distributive/

fmap f = runIdentity . collect (Identity . f)
fmap distribute . collect f = getCompose . collect (Compose . f)

Might it be worth including them in the documentation for reference?

RyanGlScott commented 7 years ago

Here they are.

matthewleon commented 7 years ago

Indeed. They just slipped my eye. Thanks for pointing it out and my apologies for wasting your time.