
29 Jul
2005
29 Jul
'05
11:01 a.m.
Hi, i have the following f :: [a] -> IO a f xs = do m <- newMVar c1 <- forkIO f1 xs m c2 <- forkIO f2 xs m c3 <- forkIO f3 xs m c<- takeMVar m killThread c1 killThread c2 killThread c3 return c co (x:xs) Šc == 1 = 1: co xs Šotherwise = (-1): co xs where c = unsafePerformIO (f (x:xs)) is it safe to use unsafePerformIO that way ? Please tell me why if it is not. Cheers _________________________________________________________________ Be the first to hear what's new at MSN - sign up to our free newsletters! http://www.msn.co.uk/newsletters