[Haskell-cafe] Re: A free monad theorem?
tomasz.zielonka at gmail.com
Sun Sep 3 03:15:12 EDT 2006
On Sun, Sep 03, 2006 at 01:23:13AM +0200, jerzy.karczmarczuk at info.unicaen.fr wrote:
> Tomasz Zielonka:
> >Programmers define the >>= method for their monads because they want to
> >use it to bind computations. They know how to pass result(s) from
> >one computation in their Monad to another, and they put this algorithm
> >in the implementation of >>=. If they didn't care about passing results
> >from one computation to the next one, they wouldn't be using monads in
> >the first place.
> If these programmers didn't care about passing results from one computation
> to the next one, they wouldn't use functional programming at all.
> Would it still be "programming"?...
I myself wanted to write that then they wouldn't be using a general
purpose programming language, but something like HTML, etc.
But then I thought that you may want to have "computations" that can't
pass values between each other. One example is an algebraic datatype for
describing tree-like structures - but you could argue that there is a
bottom-up data flow. Anyway, I haven't thought about it too much...
More information about the Haskell-Cafe