diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2015-03-21 22:17:13 +0900 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2015-03-21 22:17:13 +0900 |
commit | 392d354b8e4802ca8f83129260959bccd5a43aab (patch) | |
tree | 729b205265bf2d38e9e7c2a79b462b391d6f41fb | |
parent | 427ab285243493770c7c645fe52478ef59fff981 (diff) | |
download | sariulclocks-392d354b8e4802ca8f83129260959bccd5a43aab.tar.gz |
make weeklyCron slightly more efficient
-rw-r--r-- | src/sariulccron.hs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/sariulccron.hs b/src/sariulccron.hs index d723935..c45db0a 100644 --- a/src/sariulccron.hs +++ b/src/sariulccron.hs @@ -21,8 +21,7 @@ weeklyCron :: ScoresList -> ScoresList weeklyCron scores = ((resetTime . deductPoints 10) <$> take 3 sortedScores) ++ (resetTime <$> drop 3 sortedScores) where - sortedScores = reverse $ - sortBy (compare `on` (scoreTimeWasted . snd)) scores + sortedScores = sortBy (flip $ (compare `on` (scoreTimeWasted . snd))) scores scoreTimeWasted :: Score -> Int scoreTimeWasted (Score _ x) = x |