
10 Aug
2010
10 Aug
'10
6:09 p.m.
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, Javascript: var x = function() { return randomNumber(10, 15); } return x() + x(); Martijn.