3 ms·
> 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/ty
by dwohnitmok 5y ago
> 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.
- opnitro 5y agoYes that seems right, sorry.