Proposal: Applicative => Monad: Call for consensus
lemming at henning-thielemann.de
Fri Jan 7 12:17:51 CET 2011
Gábor Lehel schrieb:
> On Tue, Jan 4, 2011 at 1:25 PM, Ian Lynagh <igloo at earth.li> wrote:
>> On Mon, Jan 03, 2011 at 11:30:44PM +0100, Bas van Dijk wrote:
>>> 2) Make 'join' a method of Monad.
> Of course I'm only a sample size of one, but I find join a lot easier
> to think about and implement than (>>=). Even trying to look at it
> objectively and factor out my own potential idiosyncracies, it's
> obvious that it only has one argument to (>>=)'s two, and the type
> signature looks a lot more straightforward any way I slice it. I was
> very glad to see this proposal to make it possible to define a Monad
> using return (pure), fmap, and join, rather than return and (>>=).
Mathematically I like 'join' more than '>>=', but for RMonads like
StorableVector you will in general be able to define a '>>=' but not
'join'. Of course, you can ignore this reason, because Monad is not
RMonad, but for reasons of consistency it might count.
More information about the Libraries