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.

_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to