Guest User

Untitled

a guest
Apr 24th, 2013
40
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  45 listAll :: FilePath -> IO [FilePath]
  2.  46 listAll f = do
  3.  47     isFile <- doesFileExist f
  4.  48     if isFile then
  5.  49         return [f]
  6.  50     else
  7.  51         do
  8.  52             fs <- getDirectoryContents f
  9.  53             let files = fmap (f </>) . filter ((/='.') . head) $ fs
  10.  54             branches <- forM files listAll
  11.  55             return $ concat branches
Advertisement
Add Comment
Please, Sign In to add comment