Closed barrucadu closed 6 years ago
https://github.com/ekmett/contravariant/blob/3e605d46ed342cac4428ce80c07255ee4a0ed7b9/src/Data/Functor/Contravariant/Divisible.hs#L584-L592
The comment says that we need to reassociate, but the f' in the third law there doesn't appear to be reassociating at all, as it's throwing away the d component.
f'
d
Should it be f' a = let (bc, d) = f a; (b, c) = g bc in (b, (c, d))?
f' a = let (bc, d) = f a; (b, c) = g bc in (b, (c, d))
Yes, it should.
Cool, I'll submit a PR.
https://github.com/ekmett/contravariant/blob/3e605d46ed342cac4428ce80c07255ee4a0ed7b9/src/Data/Functor/Contravariant/Divisible.hs#L584-L592
The comment says that we need to reassociate, but the
f'
in the third law there doesn't appear to be reassociating at all, as it's throwing away thed
component.Should it be
f' a = let (bc, d) = f a; (b, c) = g bc in (b, (c, d))
?