From b282e055140ff65879296d4654ad269cc7ff8185 Mon Sep 17 00:00:00 2001 From: Jed Barber Date: Fri, 27 Jan 2017 17:39:05 +1100 Subject: Code a lot cleaner, algorithm theoretically improved, yet still slow as fuck probably due to criteria parsing --- src/Criteria.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/Criteria.hs') diff --git a/src/Criteria.hs b/src/Criteria.hs index 5df9cf1..7f46970 100644 --- a/src/Criteria.hs +++ b/src/Criteria.hs @@ -42,7 +42,8 @@ evaluate ballot preferences criteria = isValidInput :: Typ.BelowLineBallot -> [Pref.Preference] -> Bool isValidInput ballot preferences = - all (\(x,y) -> x > 0 && x <= length ballot && y > 0 && y <= length ballot) preferences + all (\(x,y) -> x > 0 && x <= length ballot + && y > 0 && y <= length ballot) preferences -- cgit