linted files

This commit is contained in:
IGI-111
2015-04-08 13:39:59 +00:00
parent ae5b95c69d
commit ddffd9a8f1
4 changed files with 16 additions and 14 deletions

View File

@@ -21,8 +21,8 @@ main = do
let output = formatToCSV table freqPats
putStrLn output
when (length args > 2) $
writeFile (args !! 2) $ output
writeFile (args !! 2) output
formatToCSV :: [ItemSet] -> [ItemSet] -> String
formatToCSV table frequents = foldr (\x old -> old ++ formatRow x ++ "\n") "" frequents where
formatToCSV table = foldr (\x old -> old ++ formatRow x ++ "\n") "" where
formatRow (ItemSet set) = init $ Set.foldr (\x old -> old ++ show x ++ ",") (show (count table (ItemSet set)) ++",") set