Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 45 listAll :: FilePath -> IO [FilePath]
- 46 listAll f = do
- 47 isFile <- doesFileExist f
- 48 if isFile then
- 49 return [f]
- 50 else
- 51 do
- 52 fs <- getDirectoryContents f
- 53 let files = fmap (f </>) . filter ((/='.') . head) $ fs
- 54 branches <- forM files listAll
- 55 return $ concat branches
Advertisement
Add Comment
Please, Sign In to add comment