Closed syaiful6 closed 3 years ago
the b
type suddenly introduced on my collectOf
, it look like because how this type f b -> a
composed.
Yes, I think this is right. It took me a while to see it, but the grate in collectOf
is currently trying to replace the wrong functor. It should be taking the place of the Distributive
funtctor, not the other one.
Could you make a PR please?
Thanks!
so i played with Grate and Distributive. It look like
collectOf
should be defined like this:so i can do
collectOf cotraversed
, in psci it yield type:which what i want. But if i apply the current implementation to
cotraversed
it will yied:which i believe not what we want. Notice the
Distributive
constraint appear both in input and output.