News for hackers. Stuff that matters.
Re:Monads are monoids in the category of endofunctors by dwohnitmok on Thursday September 09, 2021 @09:37PM (#28476831)
> They also need to preserve composition.

I didn't state this because this generally comes for free, assuming no shenanigans such as runtime type reflection/type-casing (but in that case all laws go out the window). In particular in Haskell (which is what I assume you're coming from given fmap and your ML-ish syntax) this is a superfluous law. If a type constructor's `fmap` obeys the identity law, it must obey the composition law.

Re:Monads are monoids in the category of endofunctors by opnitro on Friday September 10, 2021 @12:15AM (#28477764)
Yes that seems right, sorry.