Hello Günther,

Saturday, July 4, 2009, 3:11:23 AM, you wrote:

> I've got an IO action, some file system IO, traversing one level only and
> iterating over files found. I wish to build in an "early" exit, ie. if an
> IO action in the loop encounters a particular value I want it to abort the
> loop.

just make an explicit loop:

process [] = return ()
process (file:files) = do x <- doit file
                          if x>0 then process files
                                 else return ()
-- 
Best regards,
 Bulat                            mailto:bulat.zigans...@gmail.com

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to