On 8/1/05, Dinh Tien Tuan Anh <[EMAIL PROTECTED]> wrote:

> 
> depends on value of the first two elements of the list, f1, f2 and f3 will
> return three different values. So is it safe ?
> 

If "f xs" always returns the same value for a given xs, then it's safe.
Doesn't look like that's the case here, though, since depending on the
GHC runtime scheduler f1 may finish first in one case, and then the
next time f2 may finish first, meaning that f xs will return two
different results for the same xs.
So that's not safe, and thus it should be in the IO monad.


/S

-- 
Sebastian Sylvan
+46(0)736-818655
UIN: 44640862
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to