Re:Monads are monoids in the category of endofunctors
by tantalor on Friday September 10, 2021 @12:54PM
(#28484225)
I think the confusion is calling anything that doesn't "obey the rules" a map function just because it is named "map".
For example, ruby's hash "map" returns an array instead of hash. That's not really a map, is it?
Making this useless distinction between "things with map function" and "functors" serves no purpose. It should be "things with real/fake map functions".
Re:Monads are monoids in the category of endofunctors
by opnitro on Friday September 10, 2021 @11:54PM
(#28489308)
Sure, the name doesn't matter. The type does though.
`Functor f => a -> b -> f a -> f b` And it most type systems the law can't easily be captured in the type system.
For example, ruby's hash "map" returns an array instead of hash. That's not really a map, is it?
Making this useless distinction between "things with map function" and "functors" serves no purpose. It should be "things with real/fake map functions".
The name of the function does not matter!