« Return to Thread: Cont, ContT and IO()

Re: Cont, ContT and IO()

by Matthias Görgens-2 :: Rate this Message:

Reply to Author | View in Thread

>> process' = foldl op True files
>> op True file = doit file
>> op False _ = False

Please pardon me.  'doit' should surely be able to do some IO:

> import Data.Foldable
> import System.IO
> process' = foldlM op True files
> op True file = doit file
> op False _ = return False

were DoIt has the type FilePath -> IO Bool
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@...
http://www.haskell.org/mailman/listinfo/haskell-cafe

 « Return to Thread: Cont, ContT and IO()