dunai
dunai copied to clipboard
`dunai`: MSFs are profunctors
I think that for any functor m
, MSF m
is a profunctor. This means that we can pre- and postcompose MSF
s with pure functions, and that precomposition is contravariant. In arrows, precomposition is known as the (^>>)
operator.
For the additional dependency of the profunctor
package, we could implement a Profunctor
instance for MSF m
. Possibly, this is not so hard, and might be a beginner's issue. I'm not sure what the huge advantages are, though.
Similarly, I believe that MSF m
is a Traversing
: From an MSF m a b
you can make an MSF m [a] [b]
, and similarly for other Traversable
structures.