[Haskell-cafe] Re: Can we come out of a monad?

Martijn van Steenbergen martijn at van.steenbergen.nl
Tue Aug 10 18:09:51 EDT 2010

On 8/10/10 23:53, Felipe Lessa wrote:
> and the result is "IO Int".  When we "replace the function call by its
> result", I think it is fair to replace the C function call by an "int"
> and the Haskell function call by an "IO Int", because that is what
> those functions return.

Fair enough. :-)

Also, a correction to what I said earlier: it's not C's = that 
corresponds to a bind <-, it's (...args...) that does. I think.

On a side note, imperative languages with first-class 
functions/delegates can express your Haskell example. For example, 

   var x = function() { return randomNumber(10, 15); }
   return x() + x();


More information about the Haskell-Cafe mailing list