News for hackers. Stuff that matters.
Re:Monads for Normal Programmers by magsun on Friday February 08, 2013 @02:09PM (#5189538)
A monad is an object whose methods return: either itself if that method is not meant to change the object's properties, like getters; or a new copy of original monad object with changed properties if that method is meant to change object properties, like setters.
Re:Monads for Normal Programmers by runT1ME on Friday February 08, 2013 @03:15PM (#5189853)
no. String concatenation is not a monad.
Re:Monads for Normal Programmers by groovy2shoes on Friday February 08, 2013 @06:50PM (#5190843)
Strings and concatenation do, however, form a monoid.

http://en.wikipedia.org/wiki/Monoid

Re:Monads for Normal Programmers by thirsteh on Friday February 08, 2013 @09:31PM (#5191311)
A monoid is anything with an associative append and an identity operation. A monad is a form of monoid (in the category of endofunctors; what's the problem?), but monoids are not necessarily monads.
Re:Monads for Normal Programmers by groovy2shoes on Friday February 08, 2013 @09:57PM (#5191405)
> A monoid is anything with an associative append and an identity operation.

It doesn't have to be an append, it can be any associative operation that is closed over its domain and the domain features an identitiy element.

> A monad is a form of monoid (in the category of endofunctors; what's the problem?),

A category theoretic monad may be a "monoid in the category of endofunctors". The Monad type is not, strictly speaking, a monoid (but looks like one if you squint a little).

> but monoids are not necessarily monads.

Who said they are? :)

Re:Monads for Normal Programmers by thirsteh on Friday February 08, 2013 @10:44PM (#5191552)
It sounded like you were implying that they were, but the biggest thing they have in common is that their names sound similar.