From 2f06fd221d6805ace4b4ae50144bee7293f9e402 Mon Sep 17 00:00:00 2001 From: Jonathan Lamothe Date: Sun, 15 Dec 2019 13:26:22 -0500 Subject: [PATCH] sort descending --- src/Mtlstats/Report.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Mtlstats/Report.hs b/src/Mtlstats/Report.hs index 074be88..4f4684f 100644 --- a/src/Mtlstats/Report.hs +++ b/src/Mtlstats/Report.hs @@ -136,7 +136,8 @@ yearToDateStatsReport :: Int -> ProgState -> [String] yearToDateStatsReport width s = let db = s^.database - playerStats = sortOn (psPoints . snd) + playerStats = reverse + $ sortOn (psPoints . snd) $ map (\p -> (p, p^.pYtd)) $ filter playerIsActive $ db^.dbPlayers @@ -153,7 +154,8 @@ lifetimeStatsReport :: Int -> ProgState -> [String] lifetimeStatsReport width s = let db = s^.database - playerStats = sortOn (psPoints . snd) + playerStats = reverse + $ sortOn (psPoints . snd) $ map (\p -> (p, p^.pLifetime)) $ db^.dbPlayers