Re:Effectful Haskell: IO, Monads, Functors
by spion on Saturday August 29, 2015 @02:46PM
(#10140959)
> It's relatively common to refer to the underlying set as a monoid (or whatever structure you're talking about) if it's clear from the context what the operations are, though.
Relatively common even outside Haskell?
Re:Effectful Haskell: IO, Monads, Functors
by mmarx on Saturday August 29, 2015 @02:54PM
(#10140982)
> Relatively common even outside Haskell?
It's common throughout mathematics. So common, in fact, that there's even a wikipedia article on the phenomenon[0].
“Common examples occur when speaking of compound mathematical objects. […] Similarly, one often refers to a group (G, \star) as simply G when the group operation is clear from context.”
It's relatively common to refer to the underlying set as a monoid (or whatever structure you're talking about) if it's clear from the context what the operations are, though.
> The set may, at best, be "monoidal" (i.e. there exists associative binary operator <> and a set member ZERO such that for all elements of the set, ZERO <> x == x <> ZERO == x).
That's a pretty useless definition, though, as every non-empty set trivially satisfies that condition (just pick any element as the zero element, and let the binary operation be the constant mapping to that element). Also, “monoidal” usually means a monoidal category, which is something very different from the underlying set of a monoid altogether.