import System
import System.Directory
main = do args <- getArgs
case args of
[] -> doLs "."
_ -> mapM_ (doLs) args
doLs path = putStr . unlines =<< dirEntries path
dirEntries :: FilePath -> IO [String]
dirEntries path = return . filter notDotFile =<< getDirectoryContents path
where
notDotFile ('.':_) = False
notDotFile _ = True