fix empty empty notVotedForCandidates problem

This commit is contained in:
Jack Wines 2023-07-06 20:09:05 -07:00
parent d54bcedad9
commit ffb200c7e9

View file

@ -7,7 +7,7 @@ import qualified Data.Maybe as M
import qualified Data.Ord as O
solve :: forall a. Ord a => [a] -> LN.NonEmpty (LN.NonEmpty a) -> [S.Set a]
solve candidates votes = (reverse solved) ++ [notVotedForCandidates]
solve candidates votes = (reverse solved) ++ if (S.null notVotedForCandidates) then [] else [notVotedForCandidates]
where
-- candidates not on any submitted ballot