summaryrefslogtreecommitdiff
path: root/src/main.hs
diff options
context:
space:
mode:
authorJed Barber <jjbarber@y7mail.com>2017-01-06 18:54:42 +1100
committerJed Barber <jjbarber@y7mail.com>2017-01-06 18:54:42 +1100
commit9c88780375c5fd42f305746156484257c02245c7 (patch)
tree6eaf9ea4451357812b56229951dffa68e04c975b /src/main.hs
parent93a9b586e82b5d113d9140ceac95acabc7d51917 (diff)
Code reworked, now 16x faster, but uses 18.5x more memory
Diffstat (limited to 'src/main.hs')
-rw-r--r--src/main.hs29
1 files changed, 26 insertions, 3 deletions
diff --git a/src/main.hs b/src/main.hs
index 99a6681..6e95f2a 100644
--- a/src/main.hs
+++ b/src/main.hs
@@ -37,14 +37,37 @@ below = [ "Pile, Jan"
, "Strettles, Greg" ]
+above2 = [[1,2],[3,4],[5,6],[7,8],[9,10],[11,12],[13,14],[15,16],[17,18],[19,20]]
+below2 = [ "Donnelly, Matt"
+ , "Hennings, Cawley"
+ , "Edwards, David"
+ , "Mihaljevic, Denis"
+ , "Gallagher, Katy"
+ , "Smith, David"
+ , "O'Connor, Sandie"
+ , "Wyatt, Jess"
+ , "Haydon, John"
+ , "Tye, Martin"
+ , "Seselja, Zed"
+ , "Hiatt, Jane"
+ , "Field, Deborah"
+ , "Montagne, Jessica"
+ , "Hobbs, Christina"
+ , "Wareham, Sue"
+ , "Kim, David William"
+ , "Tadros, Elizabeth"
+ , "Bailey, Steven"
+ , "Swan, Robbie"
+ , "Hay, Michael Gerard"
+ , "Hanson, Anthony" ]
+
main = do
args <- Env.getArgs
counter <- Sen.createSenateCounter (head args) above below
- let testTraces = map (:[]) (zip [1,1..] below)
- theCounter = Maybe.fromJust counter
- results = map (\x -> (Sen.doCount theCounter x) >>= (putStrLn . (((snd . head $ x) ++ " ") ++) . show)) testTraces
+ let testTraces = (map (:[]) (zip [1,1..] below))
+ results = map (\x -> putStrLn . (((snd . head $ x) ++ " ") ++) . show . (Sen.doCount counter) $ x) testTraces
sequence_ results