
14 May
2008
14 May
'08
3:54 p.m.
On Wed, 14 May 2008, Mike Jarmy wrote:
Newbie question: Given a list of type '[FilePath]', how do I create a list of all those directories which do not actually exist, and then print the list? I've figured out how to extract the ones which *do* exist, like so:
module Main where
import Control.Monad (filterM) import System.Directory (doesDirectoryExist) import System.Environment (getArgs)
main :: IO () main = do dirs <- getArgs let existing = filterM doesDirectoryExist dirs
should be
existing <- filterM doesDirectoryExist dirs
I think.