dunai icon indicating copy to clipboard operation
dunai copied to clipboard

`dunai`: MSFs are profunctors

Open turion opened this issue 4 years ago • 1 comments

I think that for any functor m, MSF m is a profunctor. This means that we can pre- and postcompose MSFs 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.

turion avatar May 12 '20 09:05 turion

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.

turion avatar Apr 22 '21 17:04 turion