
7 Feb
2020
7 Feb
'20
12:55 p.m.
On 2/1/20, Jack Kelly
In Data.Monoid there is the 'Endo' newtype, which wraps functions of type 'a -> a'. Is there an 'EndoM' variant, or is that something that's usually created by putting other pieces together? Below is a sketch of what I mean:
-- Maybe this is known by another name? newtype EndoM f a = EndoM { appEndoM :: a -> f a }
I define a general `Endo` type in the category package, here: http://hackage.haskell.org/package/category-0.2.5.0/docs/Data-Morphism-Endo.... Thus one can use `Endo (Kleisli m)`.