monoids

Examples of monoids/semigroups in programming

It is well-known that monoids are stunningly ubiquitous in programing. They are so ubiquitous and so useful that I, as a 'hobby project', am working on a system that is completely based on their properties (distributed data aggregation). To make the system useful I need useful monoids :) I already know of these: Numeric or matrix sum ...

Are monads Writer m and Either e categorically dual?

I noticed there is a dual relation between Writer m and Either e monads. If m is a monoid, then unit :: () -> m join :: (m,m) -> m can be used to form a monad: return is composition: a -> ((),a) -> (m,a) join is composition: (m,(m,a)) -> ((m,m),a) -> (m,a) The dual of () is Void (empty type), the dual of product is coproduct. Every...

A monad is just a monoid in the category of endofunctors, what's the problem?

Who first said A monad is just a monoid in the category of endofunctors, what's the problem? and on a less important note is this true and if so could you give an explanation(hopefully one that can be understood by someone who doesn't have much haskell experience). ...

application of monoids and semigraphs in programming

i hv been asked to make a presentation on semigroups,monoids and their applications.as of now,i know only about groups.can you guys please help me out with the application part atleast..something tht wl b interesting yet easy to explain(sth like a simple code)... expecting a reply asap thnx :) nuts ...