Proposal: Applicative => Monad: Call for consensus

Wolfgang Jeltsch g9ks157k at acme.softbase.org
Tue Jan 18 10:00:13 CET 2011


Am Montag, den 17.01.2011, 19:24 -0500 schrieb Jan-Willem Maessen:
> I think Tyson Whitehead unwittingly made my point rather well using
> the example of the CPS monad.  I believe his simple explanation of
> join in CPS actually leads to an incorrect definition, whereas
> explaining >>= in CPS is about as straightforward as anything
> involving CPS can be (which is to say, more than a little convoluted).

If both (>>=) and join are class methods with default implementations
that use the respective other method, you can still define the Cont
monad instance in terms of (>>=), while you can use join where it is
easier (e.g. in the [] instance). So instead of arguing whether join or
(>>=) is easier, more natural or whatever, just let us make both a
method of Monad.

Best wishes,
Wolfgang




More information about the Libraries mailing list