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