
4 Jul
2009
4 Jul
'09
6:42 a.m.
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.Ziganshin@gmail.com