[Haskell-cafe] Using unsafePerformIO
Dinh Tien Tuan Anh
tuananhbirm at hotmail.com
Mon Aug 1 06:06:14 EDT 2005
>AFAICS it is safe provided..
> f always returns the same value for a given argument list
>and..
> f has no observable side effects.
What are called "side effects" ?
>It looks to me like what you're trying to do is run three parallel
>evaluation algorithms and take the answer from whichever one
>delivers an answer first (via the MVar, which should be empty
>initially).
Yes, thats what im trying to do
> f1,f2,f3 all deliver the same answer (if they deliver an answer at all)
>and
> that answer depends on nothing but xs
>and
> none of them have any observable side effects
>then
> I guess you're probably safe.
depends on value of the first two elements of the list, f1, f2 and f3 will
return three different values. So is it safe ?
_________________________________________________________________
Winks & nudges are here - download MSN Messenger 7.0 today!
http://messenger.msn.co.uk
More information about the Haskell-Cafe
mailing list