On 8/10/10 23:27, Felipe Lessa wrote:
If we had in C:

   return (randomNumber(10, 15) + randomNumber(10, 15))

That would not be the same as:

   int x = randomNumber(10, 15)
   return (x + x)

That's not fair. You're comparing C's '=' with Haskell's '='. But you should be comparing C's '=' with Haskell's '<-'.

In your Haskell example, x :: IO Int. In your C example, x :: Int.

Martijn.
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to