
2 May
2005
2 May
'05
3:13 a.m.
I don't think they are in the standard libraries but there was some discussion about them a few months ago but I couldn't find a reference. Peter, Can you supply one? I think you were a participant in the discussion. Did you put a library of this sort of thing together? Here's my tuppenceworth which I used to send a sequence of ip packets (as actions) and to stop when I got a destination unreachable: sequenceWhile_ :: Monad m => (a -> Bool) -> [m a] -> m () sequenceWhile_ p [] = return () sequenceWhile_ p (x:xs) = x >>= \c -> if (p c) then sequenceWhile_ p xs else return () Dominic.