Re:A monad is a monoid in the category of endofunctors, what...
by krapp on Sunday February 10, 2019 @11:14AM
(#19128344)
That makes them sound like union types to me, but I'm guessing they're not like union types, otherwise that's what they would be called.
Re:A monad is a monoid in the category of endofunctors, what...
by mlevental on Sunday February 10, 2019 @11:22AM
(#19128379)
Union/sum types don't combine things though? you can only have ever one variant at a time. it's a misnomer. monads and monoids combine things in the sense of joining them. e.g. lists are a monoid because you can concatenate (they're also a monad for the same reason).
with monoids, you can combine things, and then monads result from choosing a clever combining operation in a certain contexts