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

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


> process [] = return ()
> process (file:files) = do x <- doit file
>                          if x>0 then process files
>                                 else return ()

Or use a fold:

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


More information about the Haskell-Cafe mailing list