Commit 5f4ddbf8 authored by Alexandre Delanoë's avatar Alexandre Delanoë

cosmetics.

parent be1e2f0f
......@@ -120,9 +120,10 @@ fromMap = concat . map (\(k,n) -> (take n . repeat) k) . DM.toList
-- Make instance ScoreVote
voteToRational :: (Ord k, Bounded k, Enum k) => k -> Rational
voteToRational v = fromJust $ DM.lookup v $ DM.fromList $ zip vs [minimum + 1 .. minimum + (toRational . length) vs]
voteToRational v = fromJust $ DM.lookup v
$ DM.fromList
$ zip vs [0 .. (toRational . length) vs]
where
minimum = 0 -- minimum could be negative ?
vs = [minBound..maxBound]
medianFromSorted :: Fractional a => [a] -> Maybe a
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment