[Haskell-cafe] Cont, ContT and IO()

Matthias Görgens matthias.goergens at googlemail.com
Sat Jul 4 10:44:42 EDT 2009


>> 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


More information about the Haskell-Cafe mailing list